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"
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