Add clean command

This commit is contained in:
Jerome Petazzoni
2020-09-27 16:25:37 +02:00
parent d402a2ea93
commit 33174a1682

View File

@@ -43,6 +43,16 @@ _cmd_cards() {
info "$0 www"
}
_cmd clean "Remove information about stopped clusters"
_cmd_clean() {
for TAG in tags/*; do
if grep -q ^stopped$ "$TAG/status"; then
info "Removing $TAG..."
rm -rf "$TAG"
fi
done
}
_cmd deploy "Install Docker on a bunch of running VMs"
_cmd_deploy() {
TAG=$1