Rev 3410 Rev 3415
Line 2... Line 2...
2 # 2 #
3 # sync directory to server 3 # sync directory to server
4 # 4 #
5 # this script should not be called manually 5 # this script should not be called manually
6   6  
-   7 echo $1 , $2
-   8 echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-   9  
7 [[ "$#" -ne 1 ]] && echo "Please provide directory to upload" && exit 1 10 [[ "$#" < 1 ]] && echo "Please provide directory to upload" && exit 1
8   11  
9 # debug 12 # debug
10 set -x 13 set -x
11   14  
12 #cd `dirname $1` 15 #cd `dirname $1`
Line 16... Line 19...
16   19  
17 # if exclude-list.txt is present, use it 20 # if exclude-list.txt is present, use it
18 # could as well be changed for rsync -q, but this is more clear 21 # could as well be changed for rsync -q, but this is more clear
19 if [[ -f exclude-list.txt ]] 22 if [[ -f exclude-list.txt ]]
20 then 23 then
21 rsync -avtz "$UPDIR"/ --rsh='ssh -p2223' --exclude-from='exclude-list.txt' meteor@meteor1.astrozor.cz:meteors/"$STATIONNAME"/"$UPDIR" 24 rsync -avvtz "$2" "$UPDIR"/ --rsh='ssh -p2223' --exclude-from='exclude-list.txt' meteor@meteor1.astrozor.cz:meteors/"$STATIONNAME"/"$UPDIR"
22 else 25 else
23 rsync -avtz "$UPDIR"/ --rsh='ssh -p2223' meteor@meteor1.astrozor.cz:meteors/"$STATIONNAME"/"$UPDIR" 26 rsync -avvtz "$2" "$UPDIR"/ --rsh='ssh -p2223' meteor@meteor1.astrozor.cz:meteors/"$STATIONNAME"/"$UPDIR"
24 fi 27 fi