From 01a7518bcef3cdb1d3816ef9443373243f6510ed Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 25 Feb 2014 12:41:41 -0300 Subject: Git maintenance operations --- lib/keyringer/actions/check | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3