You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
mirror/bin/csc-sync-wget

17 lines
381 B

#!/bin/bash -e
if [ $# -lt 3 ]; then
echo 'Usage: sync local_dir path cut'
exit 1
fi
umask 002
TO=/mirror/root/$1
SOURCE_PATH=$2
CUT=$3
ADDRESS=$(cat ~/config/ADDRESS)
mkdir -p $TO
cd $TO
exec nice wget -q --bind-address=$ADDRESS --mirror --no-parent --no-host-directories --cut-dirs=$CUT --content-disposition --execute robots=off --recursive --reject "*\?*" $SOURCE_PATH