From 734495ab200942df7e78e7c56caf891052c46b8b Mon Sep 17 00:00:00 2001 From: hackbard Date: Tue, 6 Sep 2005 14:28:43 +0000 Subject: [PATCH] added sync script to cvs --- nlsop/sync_pics.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 nlsop/sync_pics.sh diff --git a/nlsop/sync_pics.sh b/nlsop/sync_pics.sh new file mode 100755 index 0000000..65fb302 --- /dev/null +++ b/nlsop/sync_pics.sh @@ -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 -- 2.20.1