diff options
Diffstat (limited to 'share')
-rwxr-xr-x | share/hydractl/sync-media | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/share/hydractl/sync-media b/share/hydractl/sync-media index 0976c68..8593d06 100755 --- a/share/hydractl/sync-media +++ b/share/hydractl/sync-media @@ -54,20 +54,34 @@ function sync_media_add { # Add meta files, making sure they're handled directly by Git function sync_media_add_metadata { + # Metadata state on the annex + # + # * add: metadata is managed in the annex, normally. + # * unlock: managed in the annex, but modifications are tracked as well. + # * unannex: metadata is kept out of the annex, but still tracked by Git. + # + # Usually, they should be regular files trackes by Git, so `git diff` + # works as expected. + # + #metadata_state="add" + #metadata_state="unlock" + metadata_state="unannex" + # Playlist files in the playlist folder if [ -d "playlists" ]; then - find playlists -name '*.m3u' -type l -exec git annex unlock {} \; + find playlists -name '*.m3u' -type l -exec git annex $metadata_state {} \; find playlists -name '*.m3u' -exec git add {} \; fi # Koreader metadata files - find -name metadata.pdf.lua -type l -exec git annex unlock {} \; + find -name metadata.pdf.lua -type l -exec git annex $metadata_state {} \; + find -name metadata.pdf.lua -type l -exec git annex $metadata_state {} \; find -name metadata.pdf.lua -exec git add {} \; - find -name metadata.pdf.lua.old -type l -exec git annex unlock {} \; + find -name metadata.pdf.lua.old -type l -exec git annex $metadata_state {} \; find -name metadata.pdf.lua.old -exec git add {} \; # Darktable sidecar files - find -name '*.xmp' -type l -not -path '*.git*' -exec git annex unlock {} \; + find -name '*.xmp' -type l -not -path '*.git*' -exec git annex $metadata_state {} \; find -name '*.xmp' -not -path '*.git*' -exec git add {} \; } |