Changeset 9690
- Timestamp:
- Oct 4, 2011, 5:50:42 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/django_gheat/import_scan_data.sh
r9673 r9690 11 11 12 12 DATAROOT_CHOICES="$DATAROOT /usr/local/scan-data" 13 14 DEBUG=${DEBUG:-false} 15 16 debug() { 17 $DEBUG && echo $* 18 } 19 13 20 if [ "$1" ]; then 14 21 DATAROOT=$1 … … 20 27 done 21 28 fi 22 echo"# DATAROOT: $DATAROOT"23 echo"# SSH_USER: $SSH_USER"29 debug "# DATAROOT: $DATAROOT" 30 debug "# SSH_USER: $SSH_USER" 24 31 25 echo "# rsync webfolder" 32 echo "# rsync webfolder" 1>&2 26 33 if [ -r "$SSH_KEY" ]; then 27 34 SSH_KEY_OPT="-i $SSH_KEY" … … 32 39 SSH_USER=${SSH_USER:-$SUDO_USER} 33 40 fi 34 echo rsync -avz -e "ssh $SSH_KEY_OPT -l $SSH_USER -o StrictHostKeyChecking=no" tyan.wirelessleiden.nl:/usr/local/www/webfolder/scan-data/ $DATAROOT41 rsync -O --out-format="%n%L" -az -e "ssh $SSH_KEY_OPT -l $SSH_USER -o StrictHostKeyChecking=no" tyan.wirelessleiden.nl:/usr/local/www/webfolder/scan-data/ $DATAROOT 35 42 36 43 37 echo"# unzip compressed .tar.gz files"44 debug "# unzip compressed .tar.gz files" 38 45 for FILE in `find $DATAROOT -name '*.tar.gz' | sort`; do 39 46 TARDIR=`dirname $FILE` … … 41 48 done 42 49 43 echo"# unzip compressed .zip files"50 debug "# unzip compressed .zip files" 44 51 for FILE in `find $DATAROOT -name '*.zip' | sort`; do 45 52 ARCHIVEDIR=`dirname $FILE` 46 (cd $ARCHIVEDIR; unzip - n $FILE )53 (cd $ARCHIVEDIR; unzip -qn $FILE ) 47 54 done 48 55 … … 73 80 74 81 if [ -r $MAP_CACHE ]; then 75 echo"# Clear cache $MAP_CACHE"82 debug "# Clear cache $MAP_CACHE" 76 83 htcacheclean -v -l10K -p$MAP_CACHE 77 84 fi
Note:
See TracChangeset
for help on using the changeset viewer.