aboutsummaryrefslogtreecommitdiff
path: root/files
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-02-18 16:19:36 -0300
committerSilvio Rhatto <rhatto@riseup.net>2013-02-18 16:19:36 -0300
commit742efcf6642962f6a76a667f563a4bb6a55db7a2 (patch)
tree7f3aa07ccaba224581326c1ad75f5b0696050e44 /files
parentb3aba2204ee05a01cb2436849fd9769c73da5026 (diff)
downloadpuppet-backup-742efcf6642962f6a76a667f563a4bb6a55db7a2.tar.gz
puppet-backup-742efcf6642962f6a76a667f563a4bb6a55db7a2.tar.bz2
Adding --dropunused to sync-media
Diffstat (limited to 'files')
-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