From 70354590752facc4790e425f3471ef73f857419b Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 14 May 2024 08:03:29 -0300 Subject: Fix: copy-annotations-from-kobo: check for annexed file --- copy-annotations-from-kobo | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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" <