aboutsummaryrefslogtreecommitdiff
path: root/files/sync-media
diff options
context:
space:
mode:
Diffstat (limited to 'files/sync-media')
-rw-r--r--files/sync-media18
1 files changed, 14 insertions, 4 deletions
diff --git a/files/sync-media b/files/sync-media
index 251ca0a..dc93bd9 100644
--- a/files/sync-media
+++ b/files/sync-media
@@ -49,6 +49,11 @@ if echo $OPTIONS | grep -q -- "--fsck"; then
FSCK="true"
fi
+# Set unused config
+if echo $OPTIONS | grep -q -- "--dropunused"; then
+ DROPUNUSED="true"
+fi
+
# Commit changes
if [ -d "$CACHE" ]; then
# Fix cache permissions
@@ -77,8 +82,10 @@ if [ -d "$CACHE" ]; then
git annex fsck --fast
fi
- git annex unused
- git annex dropunused 1-1000
+ if [ "$DROPUNUSED" == "true" ]; then
+ git annex unused
+ git annex dropunused 1-1000
+ fi
)
fi
done
@@ -126,8 +133,11 @@ if [ ! -z "$DRIVE" ] && [ -d "$VOLUME/$MEDIA" ]; then
git annex fsck --fast
fi
- #git annex unused
- #git annex dropunused 1-1000
+ if [ "$DROPUNUSED" == "true" ]; then
+ git annex unused
+ git annex dropunused 1-1000
+ fi
+
#git annex drop --auto --numcopies=2
)
fi