diff options
author | Christophe Lyon <christophe.lyon@linaro.org> | 2017-02-13 20:42:49 +0000 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@linaro.org> | 2017-02-13 20:42:49 +0000 |
commit | bc10573bdd10b56c7ced7a9b63a133a40a92cd1e (patch) | |
tree | 554b026e579e22c177820fa64dfb41229b4ab1db | |
parent | 7fef9983c489a2fc8dd354f61bfb672748511c60 (diff) |
start-container-*.sh: Append .tcwglab only if not already present.
Change-Id: Id16401100dea2b74ff439aea1ab022b1f4807899
-rwxr-xr-x | start-container-docker.sh | 6 | ||||
-rwxr-xr-x | start-container-none.sh | 6 | ||||
-rwxr-xr-x | start-container-schroot.sh | 6 |
3 files changed, 15 insertions, 3 deletions
diff --git a/start-container-docker.sh b/start-container-docker.sh index e9e988f5..9dd7e89f 100755 --- a/start-container-docker.sh +++ b/start-container-docker.sh @@ -75,7 +75,11 @@ done [ x${distro} = x ] && usage [ x"$session_host" = x ] && session_host=localhost -session_host=${session_host}.tcwglab +# Append .tcwglab if not already present +case ${session_host} in + *.tcwglab) ;; + *) session_host=${session_host}.tcwglab +esac if [ x"$session_name" = x ]; then # Set the default session_name, using BUILD_NUMBER and JOB_NAME, diff --git a/start-container-none.sh b/start-container-none.sh index 5cd0255d..e451aead 100755 --- a/start-container-none.sh +++ b/start-container-none.sh @@ -97,7 +97,11 @@ fi if [ x"$DOCKER_HOST" = x"" ]; then [ x"$session_host" = x ] && session_host=localhost - session_host=${session_host}.tcwglab + # Append .tcwglab if not already present + case ${session_host} in + *.tcwglab) ;; + *) session_host=${session_host}.tcwglab + esac session_port=22 else session_host="$(echo $DOCKER_HOST | sed -e "s#^tcp://\(.*\):.*#\1#")" diff --git a/start-container-schroot.sh b/start-container-schroot.sh index 1d57409b..ebf2bfdd 100755 --- a/start-container-schroot.sh +++ b/start-container-schroot.sh @@ -75,7 +75,11 @@ done [ x${distro} = x ] && usage [ x"$session_host" = x ] && session_host=localhost -session_host=${session_host}.tcwglab +# Append .tcwglab if not already present +case ${session_host} in + *.tcwglab) ;; + *) session_host=${session_host}.tcwglab +esac session_port=22 schroot_image="tcwg-${task}-${container_arch}-${distro}" |