lftpsync (284B)
1 #!/bin/bash 2 3 # $1 is server 4 # $2 is user 5 # $3 is source dir 6 # $4 is target dir 7 8 SERVER=$1 9 USER=$2 10 LOCAL=$3 11 REMOTE=$4 12 if test "$#" -ne 4; then 13 echo "Illegal number of parameters" 14 exit 42 15 fi 16 lftp -c "open ftp://$USER@$SERVER; 17 lcd $LOCAL; 18 cd $REMOTE 19 mirror --reverse --verbose" 20