X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=scripts%2Fmanage-git-mirror.sh;h=78489ecdc969d885b3d29ae034c758c634706b73;hb=HEAD;hp=d2531606556809c9b84fdf13a2021f8515e13f3f;hpb=2b6079112ea32c7fdcb4cba4ff604909335ba103;p=infrastructure.git diff --git a/scripts/manage-git-mirror.sh b/scripts/manage-git-mirror.sh index d253160..78489ec 100755 --- a/scripts/manage-git-mirror.sh +++ b/scripts/manage-git-mirror.sh @@ -36,11 +36,24 @@ function status () { ls -l /git-mirror/LOCK } +function clean () { + totrash=$(ls /git-mirror/*/NOTIFIED 2> /dev/null) + if [ -z "$totrash" ] ; then + echo "No NOTIFIED file found" + else + echo "Trashing the following files" + ls -l $totrash + rm -f $totrash + echo Done + fi +} + function main () { case $1 in start) start;; stop) stop;; status) status;; + clean) clean;; *) echo "Usage: $COMMAND start|stop";; esac }