From: Silvio Rhatto Date: Tue, 25 Feb 2014 15:41:41 +0000 (-0300) Subject: Git maintenance operations X-Git-Tag: 0.3.1~18 X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=01a7518bcef3cdb1d3816ef9443373243f6510ed;p=keyringer.git Git maintenance operations --- 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