summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-02-25 12:41:41 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-02-25 12:41:41 -0300
commit01a7518bcef3cdb1d3816ef9443373243f6510ed (patch)
tree214474f5f250b05036689df751085cfdafe6b9d6
parent6e3b2e49d62ae9418e80fe63e511ef3b8f73acae (diff)
downloadkeyringer-01a7518bcef3cdb1d3816ef9443373243f6510ed.tar.gz
keyringer-01a7518bcef3cdb1d3816ef9443373243f6510ed.tar.bz2
Git maintenance operations
-rwxr-xr-xlib/keyringer/actions/check11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/keyringer/actions/check b/lib/keyringer/actions/check
index 098d163..83401b8 100755
--- a/lib/keyringer/actions/check
+++ b/lib/keyringer/actions/check
@@ -27,4 +27,13 @@ source "$LIB" || exit 1
# This should be done here:
# TODO: Check canaries' timestamps, warning by mail if configured by user preferences.
-# TODO: Git maintenance operations.
+
+# Git maintenance operations.
+if [ -d "$BASEDIR/.git" ]; then
+ echo "Running git maintenance operations..."
+ keyringer_exec git "$BASEDIR" fsck
+ keyringer_exec git "$BASEDIR" gc --prune=all
+else
+ echo "Fatal: not a git repository: $BASEDIR"
+ exit 1
+fi