2015-07-28 14:29:14 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2016-10-12 09:16:48 +02:00
|
|
|
usage () {
|
|
|
|
cat <<EOF>&2
|
2015-07-28 14:29:14 +02:00
|
|
|
Usage: ${0##*/} SOURCE... DEST
|
|
|
|
|
|
|
|
Use rsync to copy SOURCE to DEST while showing progress and allowing resuming.
|
|
|
|
|
|
|
|
SOURCE can be multiple files or folder. A trailing slash in a source folder will
|
|
|
|
copy the content of it, not the folder itself. If DEST does not exist, it will
|
|
|
|
be created. If DEST has files not present in SOURCE, they will remain untouched.
|
|
|
|
|
|
|
|
EOF
|
2016-10-12 09:16:48 +02:00
|
|
|
}
|
2015-07-28 14:29:14 +02:00
|
|
|
|
2016-10-12 09:16:48 +02:00
|
|
|
[ $# -lt 2 ] && usage && exit 1
|
|
|
|
[ "$1" = "-h" ] && usage && exit
|
|
|
|
[ "$1" = "--" ] && shift
|
2015-07-28 14:29:14 +02:00
|
|
|
|
2015-08-22 18:24:25 +02:00
|
|
|
rsync -livr --append-verify --progress -- "$@"
|