local/bin/rget: Use --size-only rsync option.
parent
823485a60b
commit
63e2f1a6d5
|
@ -6,14 +6,14 @@ usage () {
|
||||||
cat <<EOF>&2
|
cat <<EOF>&2
|
||||||
Usage: ${0##*/} NETWORK-ADDRESS [DESTINATION]
|
Usage: ${0##*/} NETWORK-ADDRESS [DESTINATION]
|
||||||
|
|
||||||
Fetched data from NETWORK-ADDRESS to DESTINATION (defaults to current
|
Fetched data from rsync NETWORK-ADDRESS to DESTINATION (defaults to current
|
||||||
directory).
|
directory). Only size is used to compare files.
|
||||||
Protocol and port are optional: they can be specified by command line
|
Protocol and port are optional: they can be specified by command line
|
||||||
parameters.
|
parameters.
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
|
|
||||||
-H: Fetch from HTTP.
|
-H: Fetch from HTTP instead of rsync.
|
||||||
-p: Specify a port number (default: $PORT).
|
-p: Specify a port number (default: $PORT).
|
||||||
-s: Fetch single file (only in HTTP).
|
-s: Fetch single file (only in HTTP).
|
||||||
|
|
||||||
|
@ -66,5 +66,6 @@ mkdir -p "$OUTPUT"
|
||||||
if $OPT_HTTP; then
|
if $OPT_HTTP; then
|
||||||
wget --reject 'index.html*' $OPT_SINGLE --continue --content-disposition --compression=gzip --no-proxy "$ADRESS" --directory-prefix="$OUTPUT"
|
wget --reject 'index.html*' $OPT_SINGLE --continue --content-disposition --compression=gzip --no-proxy "$ADRESS" --directory-prefix="$OUTPUT"
|
||||||
else
|
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
|
fi
|
||||||
|
|
Loading…
Reference in New Issue