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