From 22446ffc19b6422f96558445a256d164db9b90bf Mon Sep 17 00:00:00 2001 From: Michael Bridgen Date: Tue, 7 Jul 2015 12:44:37 +0100 Subject: [PATCH] Handle --option=value as well as --option value In any place we munge options, treat the form with an equals the same as the form without. The exes ultimately invoked by the script handle both forms, so unless we need to do something with the option in the script, we can just let options fall through. --- weave | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/weave b/weave index 95a34e02..610878d2 100755 --- a/weave +++ b/weave @@ -944,8 +944,14 @@ common_launch_args() { args="" while [ $# -gt 0 ] ; do case "$1" in + --log-level) + [ $# -gt 1 ] || usage + args="$args $1 $2" + shift + ;; --log-level=*) args="$args $1" + ;; esac shift done @@ -978,17 +984,31 @@ launch_router() { export WEAVE_PASSWORD shift 2 ;; + --password=*) + WEAVE_PASSWORD="${1#*=}" + export WEAVE_PASSWORD + shift + ;; -port|--port) [ $# -gt 1 ] || usage CONTAINER_PORT="$2" shift 2 ;; + --port=*) + CONTAINER_PORT="${1#*=}" + shift + ;; -iprange|--iprange|--ipalloc-range) [ $# -gt 1 ] || usage IPRANGE="$2" IPRANGE_SPECIFIED=1 shift 2 ;; + --ipalloc-range=*) + IPRANGE="${1#*=}" + IPRANGE_SPECIFIED=1 + shift + ;; *) ARGS="$ARGS '$(echo "$1" | sed "s|'|'\"'\"'|g")'" shift