From e881798dadb86fde6a3d380a91caafc6cc053c19 Mon Sep 17 00:00:00 2001 From: Marco Cetica Date: Thu, 4 Apr 2024 15:31:55 +0200 Subject: [PATCH] Integrity check can now ignore symbolic links --- backup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backup.sh b/backup.sh index 3afcc93..2867c27 100755 --- a/backup.sh +++ b/backup.sh @@ -107,8 +107,8 @@ make_backup() { if [ "$BACKUP_SH_SHA256" -eq 1 ]; then shopt -s globstar dotglob for file in "$BACKUP_SH_SUBDIR"/**/*; do - # Skip directories - [ -d "$file" ] && continue + # Skip symbol links and directories + [ -d "$file" ] || [ -L "$file" ] && continue gethash "$file" >> "$BACKUP_SH_CHECKSUM_FILE" done shopt -u globstar dotglob