mybin

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

commit 4bc33c0c44472e4e2520f92b987af96a4688df83
parent b673f3adeff9c4c34b17c48ee6470f47b5476c80
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Tue,  2 Dec 2014 23:21:43 +0100

test number of parameters to avoid problems

Diffstat:
lftpsync | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/lftpsync b/lftpsync @@ -11,6 +11,10 @@ USER=$2 PASSWORD=$3 LOCAL=$4 REMOTE=$5 +if test "$#" -ne 5; then + echo "Illegal number of parameters" + exit 42 +fi lftp -c "open ftp://$USER:$PASSWORD@$SERVER; lcd $LOCAL; cd $REMOTE