aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xrun.sh5
1 files changed, 2 insertions, 3 deletions
diff --git a/run.sh b/run.sh
index aa91350..3c10997 100755
--- a/run.sh
+++ b/run.sh
@@ -265,10 +265,9 @@ if [ x"$sysroot" != x"" ]; then
sysroot_dir=${sysroot##*:}
sysroot_host="$(echo $sysroot_remote | cut -d: -f 1)"
sysroot_port="$(echo $sysroot_remote | cut -s -d: -f 2)"
- # If no port is specified, use 22 (ssh default port)
- [ x"$sysroot_port" = x ] && sysroot_port=22
- rsync -a --delete -e "ssh -p$sysroot_port" "$sysroot_host:$sysroot_dir/" "$HOME/sysroot/"
+ rsync -a --del -e "ssh ${sysroot_port:+-p$sysroot_port}" \
+ "$sysroot_host:$sysroot_dir/" "$HOME/sysroot/"
sysroot_opt="--sysroot $HOME/sysroot"
else
sysroot_opt=""