aboutsummaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2023-07-30 20:48:08 -0300
committerSilvio Rhatto <rhatto@riseup.net>2023-07-30 20:48:08 -0300
commit2c2310a2482cd8a454f92e46dc3de5d33e57fcbb (patch)
tree28e87495a40fc9341c4c863381b487f75c599fd1 /share
parent5f5e65cbe7809e8949afd2a3c8182d6b642171e2 (diff)
downloadhydra-2c2310a2482cd8a454f92e46dc3de5d33e57fcbb.tar.gz
hydra-2c2310a2482cd8a454f92e46dc3de5d33e57fcbb.tar.bz2
Feat: sync-media: handle Darktable sidecard files
Diffstat (limited to 'share')
-rwxr-xr-xshare/hydractl/sync-media9
1 files changed, 6 insertions, 3 deletions
diff --git a/share/hydractl/sync-media b/share/hydractl/sync-media
index 3d1199d..4f9ea7d 100755
--- a/share/hydractl/sync-media
+++ b/share/hydractl/sync-media
@@ -40,7 +40,7 @@ function sync_media_add {
git add playlists
fi
- # Adding hidden files and symlinks, git+while version
+ # Adds hidden files and symlinks, git+while version
git status --porcelain -u | grep '^?? ' | sed -e 's/?? //' | while read file; do
if [ -h "$file" ]; then
git add "$file"
@@ -50,14 +50,17 @@ function sync_media_add {
done
}
-# Add meta files
+# Add meta files, making sure they're handled directly by Git
function sync_media_add_metadata {
- # Make sure these are handled by Git directly
# Koreader metadata files
find -name metadata.pdf.lua -exec git annex unlock {} \;
find -name metadata.pdf.lua -exec git add {} \;
find -name metadata.pdf.lua.old -exec git annex unlock {} \;
find -name metadata.pdf.lua.old -exec git add {} \;
+
+ # Darktable sidecar files
+ find -name '*.xmp' -exec git annex unlock {} \;
+ find -name '*.xmp' -exec git add {} \;
}
# If there is a playlists folder, make sure mpd user can write to it