X-Git-Url: https://hackdaworld.org/gitweb/?p=lectures%2Flatex.git;a=blobdiff_plain;f=posic%2Fsync.sh;h=f933822a9d559b053b178c846af2c2a8ad19317c;hp=c75a64d818682993176268f62aa4d2037405ea33;hb=fec7e52be07515b5dac392facfa0b2022d002c21;hpb=d9a34a44287a6e621f2a026dc876a40ff22ccfaf diff --git a/posic/sync.sh b/posic/sync.sh index c75a64d..f933822 100755 --- a/posic/sync.sh +++ b/posic/sync.sh @@ -1,18 +1,20 @@ 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" ./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