sage no longer needed for sync
authorhackbard <hackbard@hackdaworld.org>
Mon, 24 Sep 2012 15:08:47 +0000 (17:08 +0200)
committerhackbard <hackbard@hackdaworld.org>
Mon, 24 Sep 2012 15:08:47 +0000 (17:08 +0200)
posic/sync.sh

index 1064539..f933822 100755 (executable)
@@ -1,19 +1,20 @@
 RSYNC="rsync -avz -u"
 
 RSYNC="rsync -avz -u"
 
-if [ "`hostname`" != "sage" ]; then
-       SRC="sage.physik.uni-augsburg.de:projects/latex/posic"
-fi
+TRG=hackdaworld.org:latex/posic
+
+if [ "$1" = "push" ]; then
 
 
-$RSYNC -e "ssh -p 3389" $SRC/img/ ./img/
-$RSYNC -e "ssh -p 3389" $SRC/figs/ ./figs/
-$RSYNC -e "ssh -p 3389" $SRC/plot/ ./plot/
+       $RSYNC -e "ssh" ./img/ $TRG/img/
+       $RSYNC -e "ssh" ./figs/ $TRG/figs/
+       $RSYNC -e "ssh" ./plot/ $TRG/plot/
 
 
-$RSYNC -e "ssh -p 3389" $SRC/talks/*.pdf ./talks/
+fi
 
 
-if [ "$2" = "r" ]; then
+if [ "$1" = "pull" ]; then
 
 
-       $RSYNC -e "ssh -p 3389" ./img/ $SRC/img/
-       $RSYNC -e "ssh -p 3389" ./figs/ $SRC/figs/
+       $RSYNC -e "ssh" $SRC/img/ ./img/
+       $RSYNC -e "ssh" $SRC/figs/ ./figs/
+       $RSYNC -e "ssh" $SRC/plot/ ./plot/
 
 fi
 
 
 fi