From 74ffb7dfec443c675ac03f3ba86afb5cd5efc2b1 Mon Sep 17 00:00:00 2001 From: Joey Hafner Date: Mon, 9 Oct 2023 11:33:44 -0700 Subject: [PATCH] Iterate on docker-stacks script --- fighter/scripts/docker-stacks.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/fighter/scripts/docker-stacks.sh b/fighter/scripts/docker-stacks.sh index bf2fb70..5692eb6 100644 --- a/fighter/scripts/docker-stacks.sh +++ b/fighter/scripts/docker-stacks.sh @@ -38,6 +38,9 @@ function compose_up_recreate { } function main { + NASONLY=false + LINT=false + FORCE=false while [ $# -gt 0 ]; do case $1 in -n | --nas-only) @@ -46,12 +49,26 @@ function main { -l | --lint) LINT=true ;; + -f | --force) + FORCE=true + ;; *) - OPERATION=$1 + OPERATION="$OPERATION $1" ;; esac shift done + case $OPERATION in + up) + echo "OPERATION is up" + ;; + down) + echo "OPERATION is down" + ;; + *) + echo "OPERATION is not up or down" + ;; + esac echo "\$NASONLY is $NASONLY" echo "\$LINT is $LINT"