diff --git a/.local/bin/rget b/.local/bin/rget index 8e06352c..29dbe51a 100755 --- a/.local/bin/rget +++ b/.local/bin/rget @@ -6,14 +6,14 @@ usage () { cat <&2 Usage: ${0##*/} NETWORK-ADDRESS [DESTINATION] -Fetched data from NETWORK-ADDRESS to DESTINATION (defaults to current -directory). +Fetched data from rsync NETWORK-ADDRESS to DESTINATION (defaults to current +directory). Only size is used to compare files. Protocol and port are optional: they can be specified by command line parameters. Options: - -H: Fetch from HTTP. + -H: Fetch from HTTP instead of rsync. -p: Specify a port number (default: $PORT). -s: Fetch single file (only in HTTP). @@ -66,5 +66,6 @@ mkdir -p "$OUTPUT" if $OPT_HTTP; then wget --reject 'index.html*' $OPT_SINGLE --continue --content-disposition --compression=gzip --no-proxy "$ADRESS" --directory-prefix="$OUTPUT" else - rsync -iavzzP $ADDRESS/files "$OUTPUT" + # We ignore timestamp by removing "-t" from "-a". See man page. + rsync -ivzzP -rlpgoD --size-only $ADDRESS/files "$OUTPUT" fi