From 70daa2f8a39477b60932a12dc98272df78be8887 Mon Sep 17 00:00:00 2001 From: r4 Date: Fri, 6 May 2022 13:49:21 +0200 Subject: [PATCH] pass arguments to rsync --- sync-music | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sync-music b/sync-music index 9698233..de935ec 100755 --- a/sync-music +++ b/sync-music @@ -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!"