fix --force

This commit is contained in:
Marc Wäckerlin
2020-04-15 11:57:36 +02:00
parent f4314812db
commit 4a9818c111

View File

@@ -1,6 +1,7 @@
#!/bin/bash
limit=''
force=''
while test $# -gt 0; do
case "$1" in
(-h|--help) cat <<EOF
@@ -10,6 +11,7 @@ OPTIONS
-h, --help show this help
-s, --limit service limit update to given service
-f, --force force update
FILES…
@@ -23,6 +25,7 @@ DESCRIPTION
EOF
exit;;
(-l|--limit) shift; limit=$1;;
(-f|--force) force='--force';;
(*) break;;
esac
if test $# -lt 1; then
@@ -43,7 +46,7 @@ for f in $*; do
IFS=" "
if [ -z "$limit" ] || [[ "${param}" =~ " ${name}_${limit}" ]]; then
echo "....update $param: docker service update --image $param"
docker service update --image $param
docker service update $force --image $param
fi
done
done