Iterate on docker-stacks.sh

This commit is contained in:
Joey Hafner 2023-10-09 12:02:35 -07:00
parent ce28408f14
commit 22fa9912e6

View File

@ -38,9 +38,8 @@ function compose_up_recreate {
} }
function main { function main {
NASONLY=false echo "\$OPERATION is $OPERATION"
LINT=false echo "Parse global flags"
FORCE=false
while [ $# -gt 0 ]; do while [ $# -gt 0 ]; do
case $1 in case $1 in
-n | --nas-only) -n | --nas-only)
@ -55,9 +54,10 @@ function main {
esac esac
shift shift
done done
echo "\$OPERATION is $OPERATION"
echo "Determine operation"
case $OPERATION in case $OPERATION in
up*) up*)
echo "OPERATION is up"
while [ $# -gt 0 ]; do while [ $# -gt 0 ]; do
case $1 in case $1 in
-f | --force) -f | --force)
@ -76,8 +76,6 @@ function main {
echo "FORCE is $FORCE" echo "FORCE is $FORCE"
;; ;;
down*) down*)
echo "OPERATION is down"
# run "down" on all stacks
while [ $# -gt 0 ]; do while [ $# -gt 0 ]; do
case $1 in case $1 in
down) down)
@ -97,10 +95,6 @@ function main {
exit exit
;; ;;
esac esac
echo "\$NASONLY is $NASONLY"
echo "\$LINT is $LINT"
echo "\$OPERATION is $OPERATION"
} }
main "$@" main "$@"