pass arguments to rsync
This commit is contained in:
parent
b267c83fd9
commit
70daa2f8a3
@ -21,6 +21,7 @@ get_mtp_dir() {
|
|||||||
[ -d "$mtpdir" ] && echo "$mtpdir"
|
[ -d "$mtpdir" ] && echo "$mtpdir"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[ -z "$1" ] && info "Any arguments are passed to rsync."
|
||||||
info "Configuration: 💻:'$SOURCE_DIR' -> 📱:'$DEST_DIR'."
|
info "Configuration: 💻:'$SOURCE_DIR' -> 📱:'$DEST_DIR'."
|
||||||
|
|
||||||
[ ! -d "$SOURCE_DIR" ] && die "The specified source directory '$SOURCE_DIR' does not exist!"
|
[ ! -d "$SOURCE_DIR" ] && die "The specified source directory '$SOURCE_DIR' does not exist!"
|
||||||
@ -43,6 +44,7 @@ rsync --progress \
|
|||||||
--recursive \
|
--recursive \
|
||||||
--inplace \
|
--inplace \
|
||||||
--exclude='*.parts' \
|
--exclude='*.parts' \
|
||||||
|
"$@" \
|
||||||
"$SOURCE_DIR" "$(get_mtp_dir)/$DEST_DIR" \
|
"$SOURCE_DIR" "$(get_mtp_dir)/$DEST_DIR" \
|
||||||
&& info "Success!" \
|
&& info "Success!" \
|
||||||
|| die "Error synchronizing files!"
|
|| die "Error synchronizing files!"
|
||||||
|
Loading…
Reference in New Issue
Block a user