From cb911b8fd1262fc2a69d37d5db3c9536f4472475 Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Sat, 8 Aug 2026 10:46:02 +0200 Subject: [PATCH] change exclude rsync param without quotes --- src/backup | 2 +- tests/backup_tests.bats | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backup b/src/backup index f2d175e..81c2bef 100755 --- a/src/backup +++ b/src/backup @@ -168,7 +168,7 @@ path_backup() "--human-readable") local exclude= for exclude in "${excludes[@]}"; do - rsyncargs+=("--exclude=\"$exclude\"") + rsyncargs+=("--exclude=$exclude") done rsyncargs+=("--rsh=\"ssh -p $port\"") local hostpath="$remote_user@$host:$path" diff --git a/tests/backup_tests.bats b/tests/backup_tests.bats index b55e9af..5bfd121 100755 --- a/tests/backup_tests.bats +++ b/tests/backup_tests.bats @@ -544,8 +544,8 @@ teardown() { assert_equal "$(awk 'NR==6 {print; exit}' "$RSYNC_LOG")" "--hard-links" assert_equal "$(awk 'NR==7 {print; exit}' "$RSYNC_LOG")" "--relative" assert_equal "$(awk 'NR==8 {print; exit}' "$RSYNC_LOG")" "--human-readable" - assert_equal "$(awk 'NR==9 {print; exit}' "$RSYNC_LOG")" "--exclude=\"/home/user/.cache\"" - assert_equal "$(awk 'NR==10 {print; exit}' "$RSYNC_LOG")" "--exclude=\"/home/user/.local\"" + assert_equal "$(awk 'NR==9 {print; exit}' "$RSYNC_LOG")" "--exclude=/home/user/.cache" + assert_equal "$(awk 'NR==10 {print; exit}' "$RSYNC_LOG")" "--exclude=/home/user/.local" assert_equal "$(awk 'NR==11 {print; exit}' "$RSYNC_LOG")" "--rsh=\"ssh -p 22\"" assert_equal "$(awk 'NR==12 {print; exit}' "$RSYNC_LOG")" "backupuser@www.example.com:/etc" assert_equal "$(awk 'NR==13 {print; exit}' "$RSYNC_LOG")" "build/2000-01-01_01_backup/testpc1" -- 2.47.3