11,16 → 11,17 |
# debug |
set -x |
|
#cd `dirname $1` |
#UPDIR=`basename $1` |
UPDIR="$1" |
UPDIR="$2" |
STATIONNAME=${PWD##*/} |
OBSERVATORYNAME="$1" |
|
#echo "$1 ; $2 ; $3 ; $4" >> /media/sd/meteors/debug.log |
|
# if exclude-list.txt is present, use it |
# could as well be changed for rsync -q, but this is more clear |
if [[ -f exclude-list.txt ]] |
then |
rsync -vvtz $2 $3 "$UPDIR"/ --rsh='ssh -p2223' --exclude-from='exclude-list.txt' meteor@meteor1.astrozor.cz:meteors/"$STATIONNAME"/"$UPDIR" |
rsync -vvtz $3 $4 "$UPDIR"/ --exclude-from='exclude-list.txt' "$OBSERVATORYNAME"@space.astro.cz:/storage/meteors/"$OBSERVATORYNAME"/"$STATIONNAME"/"$UPDIR" |
else |
rsync -vvtz $2 $3 "$UPDIR"/ --rsh='ssh -p2223' meteor@meteor1.astrozor.cz:meteors/"$STATIONNAME"/"$UPDIR" |
rsync -vvtz $3 $4 "$UPDIR"/ "$OBSERVATORYNAME"@space.astro.cz:/storage/meteors/"$OBSERVATORYNAME"/"$STATIONNAME"/"$UPDIR" |
fi |