diff --git a/home/.local/bin/incremental-backup b/home/.local/bin/incremental-backup index ebe19a5..8b73bda 100755 --- a/home/.local/bin/incremental-backup +++ b/home/.local/bin/incremental-backup @@ -6,7 +6,7 @@ # This script will respect .rsync-filter files, which can be used # to define custom exclude rules for files/dirs in which it is present -if [ $# -ne 2 ]; then +if [ $# -ge 2 ]; then echo "Invalid amount of arguments passed!" echo "Arguments: [Source path] [Backup path]" echo " Source path: directory to be backed up, usually '/'" @@ -26,6 +26,6 @@ rsync -avHAXS \ --delete \ --filter='dir-merge /.rsync-filter' \ --link-dest "${LATEST_LINK}" \ - "${SOURCE_DIR}/" "${BACKUP_PATH}" + "${@:3}" "${SOURCE_DIR}/" "${BACKUP_PATH}" ln -sf "${BACKUP_PATH}" "${LATEST_LINK}"