]> hackdaworld.org Git - lectures/latex.git/commitdiff
added sync script to cvs
authorhackbard <hackbard>
Tue, 6 Sep 2005 14:28:43 +0000 (14:28 +0000)
committerhackbard <hackbard>
Tue, 6 Sep 2005 14:28:43 +0000 (14:28 +0000)
nlsop/sync_pics.sh [new file with mode: 0755]

diff --git a/nlsop/sync_pics.sh b/nlsop/sync_pics.sh
new file mode 100755 (executable)
index 0000000..65fb302
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+FILE="./tmp~"
+rm -f $FILE
+for pic in `grep includegraphics $1/*.tex | sed 's/\(.*{\)\(.*\)}.*/\2/'`; do
+       [ -n "$pic" ] &&
+               echo "$pic" >> \
+                       $FILE
+               echo "$pic" | sed 's/eps/fig/g' >> \
+                       $FILE
+               echo "$pic" | sed 's/eps/agr/g' >> \
+                       $FILE
+               echo "$pic" | sed 's/eps/xcf/g' >> \
+                       $FILE
+               echo "$pic" | sed 's/eps/plot/g' >> \
+                       $FILE
+done
+echo "syncing the following files:"
+cat $FILE
+RSYNC="rsync -avz -e ssh --files-from=$FILE" 
+$RSYNC img/ frank-z@pc05ep4:~/work/lectures/latex/nlsop/img/ 2>/dev/null
+$RSYNC frank-z@pc05ep4:~/work/lectures/latex/nlsop/img/ img/ 2>/dev/null
+rm -f $FILE
+echo
+echo done