Compare commits

...

2 Commits

Author SHA1 Message Date
r4 bd0396af1d update readme 2022-05-06 13:49:35 +02:00
r4 70daa2f8a3 pass arguments to rsync 2022-05-06 13:49:21 +02:00
2 changed files with 3 additions and 1 deletions

View File

@ -2,4 +2,4 @@
Painlessly sync your music (or other files) to an Android device.
Just plug in your phone, give file transfer permission and run the script. Requires libmtp and GIO.
Just plug in your phone, give file transfer permission and run the script. Requires rsync, libmtp and GIO.

View File

@ -21,6 +21,7 @@ get_mtp_dir() {
[ -d "$mtpdir" ] && echo "$mtpdir"
}
[ -z "$1" ] && info "Any arguments are passed to rsync."
info "Configuration: 💻:'$SOURCE_DIR' -> 📱:'$DEST_DIR'."
[ ! -d "$SOURCE_DIR" ] && die "The specified source directory '$SOURCE_DIR' does not exist!"
@ -43,6 +44,7 @@ rsync --progress \
--recursive \
--inplace \
--exclude='*.parts' \
"$@" \
"$SOURCE_DIR" "$(get_mtp_dir)/$DEST_DIR" \
&& info "Success!" \
|| die "Error synchronizing files!"