diff options
author | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2022-05-18 16:45:12 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2022-05-18 16:45:12 +0000 |
commit | 1aa09915678a09932fbce85c48be69e782c73e4b (patch) | |
tree | ecd4b72588f077738fb7b12ef70e36778bc2aa72 /tcwg-benchmark.sh | |
parent | cefa0588deae1051ce081c65361cc9043efe8bed (diff) |
tcwg-benchmark.sh: Use port specified in .ssh/config
... for empty $build_container_port .
Change-Id: I2af315c15562fe5dadc771ac2e83ea8ab999e19f
Diffstat (limited to 'tcwg-benchmark.sh')
-rwxr-xr-x | tcwg-benchmark.sh | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/tcwg-benchmark.sh b/tcwg-benchmark.sh index 29d4e2bb..78635ca5 100755 --- a/tcwg-benchmark.sh +++ b/tcwg-benchmark.sh @@ -78,20 +78,12 @@ case "$toolchain_url" in *:*:*) build_container_port="$(echo $build | cut -s -d: -f 2)" ;; - *:*) - # If no port is specified, use 22 (ssh default port) - build_container_port=22 - ;; esac if [ "x$build_container_host" = "x" ]; then echo "ERROR: ssh:// toolchain_url lacks a host: $toolchain_url." exit 1 fi - if [ "x$build_container_port" = "x" ]; then - echo "ERROR: ssh:// toolchain_url lacks a port: $toolchain_url." - exit 1 - fi ;; *) if [ x"$builder" = x"bmk_board" ]; then @@ -175,7 +167,7 @@ esac # remotely. case "$toolchain_url" in "ssh://"*) - maybe_remote="ssh -p $build_container_port $build_container_host" + maybe_remote="ssh ${build_container_port:+-p$build_container_port} $build_container_host" ;; *) maybe_remote="" @@ -215,8 +207,10 @@ case "$toolchain_url" in ccprefix=$(echo "$ccpath" | sed -e "s/$ccname\$//") # Copy toolchain to the build container. - ssh -p$build_container_port $build_container_host mkdir -p "$toolchaindir" - rsync -a --delete -e "ssh -p$build_container_port" "$toolchaindir/" "$build_container_host:$toolchaindir/" + ssh ${build_container_port:+-p$build_container_port} \ + $build_container_host mkdir -p "$toolchaindir" + rsync -a --del -e "ssh ${build_container_port:+-p$build_container_port}" \ + "$toolchaindir/" "$build_container_host:$toolchaindir/" if [ x"$builder" != x"bmk_board" ]; then ccprefix="$build_container_host:$build_container_port:$ccprefix" fi @@ -230,8 +224,10 @@ case "$sysroot" in "http://"*|"https://"*) sysrootdir=$(untar_url "$sysroot" "$WORKSPACE" "--strip-components 1") # Copy toolchain to the build container. - ssh -p$build_container_port $build_container_host mkdir -p "$sysrootdir" - rsync -a --delete -e "ssh -p$build_container_port" "$sysrootdir/" "$build_container_host:$sysrootdir/" + ssh ${build_container_port:+-p$build_container_port} \ + $build_container_host mkdir -p "$sysrootdir" + rsync -a --del -e "ssh ${build_container_port:+-p$build_container_port}" \ + "$sysrootdir/" "$build_container_host:$sysrootdir/" sysroot="$build_container_host:$build_container_port:$sysrootdir" ;; "ssh://"*) |