local/bin/rget: Use --size-only rsync option.
parent
823485a60b
commit
63e2f1a6d5
|
@ -6,14 +6,14 @@ usage () {
|
|||
cat <<EOF>&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
|
||||
|
|
Loading…
Reference in New Issue