From c16b3ab59fa5f6f6532053d20e244841b737e1b3 Mon Sep 17 00:00:00 2001 From: Christian Wolf Date: Wed, 6 Nov 2024 11:20:06 +0100 Subject: [PATCH] Clean script for creation of archives --- scripts/create-archives.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/create-archives.sh b/scripts/create-archives.sh index 315c1b9..3035ec8 100755 --- a/scripts/create-archives.sh +++ b/scripts/create-archives.sh @@ -19,6 +19,11 @@ do echo "Creating archive for $dir" cd "$dir" - # find -type f -iname "*.jpg" | grep -v '/thumbnail.jpg$' | zip -u album.zip -@ + update= + if [ -f album.zip ] + then + update=-u + fi + find -type f -iname "*.jpg" | grep -v '/thumbnail.jpg$' | zip $update album.zip -@ ) done