From: Silvio Rhatto Date: Tue, 14 May 2024 11:03:29 +0000 (-0300) Subject: Fix: copy-annotations-from-kobo: check for annexed file X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=70354590752facc4790e425f3471ef73f857419b;p=scripts.git Fix: copy-annotations-from-kobo: check for annexed file --- diff --git a/copy-annotations-from-kobo b/copy-annotations-from-kobo index 29c1482..f86d1fe 100755 --- a/copy-annotations-from-kobo +++ b/copy-annotations-from-kobo @@ -53,7 +53,9 @@ EOT touch "$BASEFOLDER/$sdr/metadata.$extension.lua" # Make sure it's not locked by git annex - git -C $BASEFOLDER annex unlock "$sdr/metadata.$extension.lua" + if [ -L "$BASEFOLDER/$sdr/metadata.$extension.lua" ]; then + git -C $BASEFOLDER annex unlock "$sdr/metadata.$extension.lua" + fi # Update silentSsh kobo >"$BASEFOLDER/$sdr/metadata.$extension.lua" <