File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
share/github-backup-utils Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ port=$(ssh_port_part "$host")
24
24
hostname=$( ssh_host_part " $host " )
25
25
26
26
set +e
27
- output=$( echo " cat \" $GHE_REMOTE_METADATA_FILE \" 2>/dev/null || exit 101" | ghe-ssh $options $host -- /bin/sh 2>&1 )
27
+ output=$( echo " cat \" $GHE_REMOTE_METADATA_FILE \" 2>/dev/null || exit 101" | ghe-ssh -o ' BatchMode no ' $options $host -- /bin/sh 2>&1 )
28
28
rc=$?
29
29
set -e
30
30
Original file line number Diff line number Diff line change @@ -10,11 +10,11 @@ set -e
10
10
cd $( dirname " $0 " ) /../..
11
11
. share/github-backup-utils/ghe-backup-config
12
12
13
- opts=$GHE_EXTRA_SSH_OPTS
13
+ eval opts=( $GHE_EXTRA_SSH_OPTS )
14
14
while true ; do
15
15
case " $1 " in
16
16
-p|-l|-o)
17
- opts=" $ opts $1 $2 "
17
+ opts=( " ${ opts[@]} " $1 " $2 " )
18
18
shift 2
19
19
;;
20
20
--)
@@ -42,12 +42,12 @@ port=$(ssh_port_part "$host")
42
42
host=$( ssh_host_part " $host " )
43
43
44
44
# Add port / -p option when non-standard port given.
45
- [ " $port " != " 22" ] && opts=" -p $port $ opts"
45
+ [ " $port " != " 22" ] && opts=( -p $port " ${ opts[@]} " )
46
46
47
47
# Add user / -l option
48
48
user=" ${host%@* } "
49
49
[ " $user " = " $host " ] && user=" admin"
50
- opts=" -l $user $ opts"
50
+ opts=( -l " $user " " ${ opts[@]} " )
51
51
52
52
# Bail out with error if the simple command form is used with complex commands.
53
53
# Complex
61
61
$GHE_VERBOSE_SSH && set -x
62
62
63
63
# Exec ssh command with modified host / port args and add nice to command.
64
- exec ssh $ opts " $host " -- $GHE_NICE $GHE_IONICE " $@ "
64
+ exec ssh " ${ opts[@]} " -o ' BatchMode yes ' " $host " -- $GHE_NICE $GHE_IONICE " $@ "
You can’t perform that action at this time.
0 commit comments