diff --git a/pkgs/sane-scripts/src/sane-rcp b/pkgs/sane-scripts/src/sane-rcp index 643e5b39..46d6caa3 100755 --- a/pkgs/sane-scripts/src/sane-rcp +++ b/pkgs/sane-scripts/src/sane-rcp @@ -1,3 +1,10 @@ #!/usr/bin/env sh -# copy some remote file(s) to the working directory, with sane defaults -rsync -arv --progress --append-verify "$@" . +# rsync, with sane defaults +# + verbosity +# + default to cwd as destination if none is provided +dest= +if (( $# <= 1 )); then + # rsync to the current directory by default + dest='.' +fi +rsync -arv --progress --append-verify "$@" $dest