diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2014-02-25 12:41:41 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2014-02-25 12:41:41 -0300 |
commit | 01a7518bcef3cdb1d3816ef9443373243f6510ed (patch) | |
tree | 214474f5f250b05036689df751085cfdafe6b9d6 | |
parent | 6e3b2e49d62ae9418e80fe63e511ef3b8f73acae (diff) | |
download | keyringer-01a7518bcef3cdb1d3816ef9443373243f6510ed.tar.gz keyringer-01a7518bcef3cdb1d3816ef9443373243f6510ed.tar.bz2 |
Git maintenance operations
-rwxr-xr-x | lib/keyringer/actions/check | 11 |
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 |