]> www.hackdaworld.org Git - lectures/latex.git/blob - nlsop/sync_pics.sh
fixed typos in introduction chapter
[lectures/latex.git] / nlsop / sync_pics.sh
1 #!/bin/bash
2
3 FILE="./tmp~"
4 rm -f $FILE
5 for pic in `grep includegraphics $1/*.tex | sed 's/\(.*{\)\(.*\)}.*/\2/'`; do
6         [ -n "$pic" ] &&
7                 echo "$pic" >> \
8                         $FILE
9                 echo "$pic" | sed 's/eps/fig/g' >> \
10                         $FILE
11                 echo "$pic" | sed 's/eps/agr/g' >> \
12                         $FILE
13                 echo "$pic" | sed 's/eps/xcf/g' >> \
14                         $FILE
15                 echo "$pic" | sed 's/eps/plot/g' >> \
16                         $FILE
17 done
18 echo "syncing the following files:"
19 cat $FILE
20 RSYNC="rsync -avz -e ssh --files-from=$FILE" 
21 $RSYNC img/ frank-z@pc05ep4:~/work/lectures/latex/nlsop/img/ 2>/dev/null
22 $RSYNC frank-z@pc05ep4:~/work/lectures/latex/nlsop/img/ img/ 2>/dev/null
23 rm -f $FILE
24 echo
25 echo done