diff --git a/deploy.sh b/deploy.sh index dc61448..7f4c850 100755 --- a/deploy.sh +++ b/deploy.sh @@ -1,5 +1,47 @@ #!/bin/bash -e +while test $# -gt 0; do + case "$1" in + (-h|--help) cat <&2 + exit 1 + fi + shift +done + for f in $*; do f=${f%.yaml} if ! test -e ${f}.yaml; then @@ -10,5 +52,5 @@ for f in $*; do for d in $(sed -n 's/^ *source: *//p' ${f}.yaml); do test -e $d || mkdir -p $d done - docker stack deploy --compose-file ${f}.yaml ${f} + docker stack deploy --compose-file ${f}.yaml ${##*/f} done diff --git a/update.sh b/update.sh index bda654f..2a22e27 100755 --- a/update.sh +++ b/update.sh @@ -4,20 +4,21 @@ limit='' while test $# -gt 0; do case "$1" in (-h|--help) cat <