diff options
-rwxr-xr-x | copy-annotations-from-kobo | 4 |
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 |