aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2015-04-06 12:40:44 +0100
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2015-04-06 12:40:44 +0100
commit8be75403a74697c8c6bc3d01d72ff97bb2cbc388 (patch)
tree937aa31b889a1693d8a9304f43e8fb137d4b4ef0 /scripts
parentc7d526c1deeca057f3b4b0b4dd5b25979aa8fbe2 (diff)
Robustify argument parsing
Now that generation of schroot images is in a different script, mandate use of custom port for ssh server. Change-Id: Id52c1105dbdac21a82b61db54a45c7f8f13faa2e
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/test-schroot.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/test-schroot.sh b/scripts/test-schroot.sh
index 6f7bf685..26aae374 100755
--- a/scripts/test-schroot.sh
+++ b/scripts/test-schroot.sh
@@ -40,7 +40,7 @@ done
shift $((OPTIND-1))
target="${1%:*}"
-port="${1#*:}"
+port="$(echo $1 | grep ":" | sed -e "s/.*://")"
triplet_to_deb_arch()
{
@@ -72,7 +72,8 @@ if [ -z "$target" ]; then
fi
if [ -z "$port" ]; then
- port="22"
+ echo "ERROR: no custom [ssh] port specified"
+ exit 1
fi
use_qemu=false