aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2024-05-14 08:03:29 -0300
committerSilvio Rhatto <rhatto@riseup.net>2024-05-14 08:03:29 -0300
commit70354590752facc4790e425f3471ef73f857419b (patch)
treebc1df6e3a13243c906f0f1e33e6fbcf7cbdf2303
parentd580f01e9b0f37466473519206d86355a312e133 (diff)
downloadscripts-70354590752facc4790e425f3471ef73f857419b.tar.gz
scripts-70354590752facc4790e425f3471ef73f857419b.tar.bz2
Fix: copy-annotations-from-kobo: check for annexed file
-rwxr-xr-xcopy-annotations-from-kobo4
1 files changed, 3 insertions, 1 deletions
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" <<EOF