From dd20f4b5d7cad6766df603f8f169c2c3c31a5180 Mon Sep 17 00:00:00 2001 From: Orsiris de Jong Date: Thu, 14 Nov 2024 00:10:34 +0100 Subject: [PATCH] Improve restic update script handling --- RESTIC_SOURCE_FILES/update_restic.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RESTIC_SOURCE_FILES/update_restic.sh b/RESTIC_SOURCE_FILES/update_restic.sh index a07fec7..ff8fb5b 100755 --- a/RESTIC_SOURCE_FILES/update_restic.sh +++ b/RESTIC_SOURCE_FILES/update_restic.sh @@ -22,8 +22,8 @@ for platform in "${platforms[@]}"; do echo "Moving earlier version to archive" [ -d ARCHIVES ] || mkdir ARCHIVES mv -f restic_*_${platform} ARCHIVES/ > /dev/null 2>&1 - # Move all except restic legacy binary - mv -f !(restic_0.16.2_${platform}.exe) ARCHIVES/ > /dev/null 2>&1 + # Move all restic executables except restic legacy binary + find ./ -type f -mindepth 1 -maxdepth 1 -name "restic_*${platform}.exe" -and ! -name "restic_0.16.2_windows_386.exe" -exec mv '{}' ARCHIVES \; # Avoid moving restic echo "Downloading ${restic_filename}" if [ "${platform:0:7}" == "windows" ]; then