mybin

my ~/bin
git clone https://a3nm.net/git/mybin/
Log | Files | Refs | README

commit 821804834c640320f5219d30e1d7f95b36162e54
parent 2b7cb2de476ba15acdc9364f7d1c6b08fbe684c3
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Tue,  2 Dec 2014 23:33:10 +0100

no password, use netrc

Diffstat:
lftpsync | 14++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/lftpsync b/lftpsync @@ -2,20 +2,18 @@ # $1 is server # $2 is user -# $3 is password -# $4 is source dir -# $5 is target dir +# $3 is source dir +# $4 is target dir SERVER=$1 USER=$2 -PASSWORD=$3 -LOCAL=$4 -REMOTE=$5 -if test "$#" -ne 5; then +LOCAL=$3 +REMOTE=$4 +if test "$#" -ne 4; then echo "Illegal number of parameters" exit 42 fi -lftp -c "open ftp://$USER:$PASSWORD@$SERVER; +lftp -c "open ftp://$USER@$SERVER; lcd $LOCAL; cd $REMOTE mirror --reverse --verbose"