Skip to content

Commit fd908ff

Browse files
committed
install.sh: Allow customizing remote shell with $RSH
1 parent f87f8a6 commit fd908ff

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

install.sh

+15-4
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ ${not_curl_usage-}
2424
Usage:
2525
2626
$arg0 [--dry-run] [--version X.X.X] [--method detect] \
27-
[--prefix ~/.local] [user@host]
27+
[--prefix ~/.local] [--rsh ssh] [user@host]
2828
2929
--dry-run
3030
Echo the commands for the install process without running them.
@@ -45,6 +45,9 @@ Usage:
4545
and the binary symlinked into ~/.local/bin/code-server
4646
To install system wide pass ---prefix=/usr/local
4747
48+
--rsh <bin>
49+
Specifies the remote shell for remote installation. Defaults to ssh.
50+
4851
- For Debian, Ubuntu and Raspbian it will install the latest deb package.
4952
- For Fedora, CentOS, RHEL and openSUSE it will install the latest rpm package.
5053
- For Arch Linux it will install the AUR package.
@@ -109,7 +112,8 @@ main() {
109112
VERSION \
110113
OPTIONAL \
111114
ALL_FLAGS \
112-
RSH_ARGS
115+
RSH_ARGS \
116+
RSH
113117

114118
ALL_FLAGS=""
115119
while [ "$#" -gt 0 ]; do
@@ -144,6 +148,13 @@ main() {
144148
--version=*)
145149
VERSION="$(parse_arg "$@")"
146150
;;
151+
--rsh)
152+
RSH="$(parse_arg "$@")"
153+
shift
154+
;;
155+
--rsh=*)
156+
RSH="$(parse_arg "$@")"
157+
;;
147158
-h | --h | -help | --help)
148159
usage
149160
exit 0
@@ -170,8 +181,8 @@ main() {
170181
done
171182

172183
if [ "${RSH_ARGS-}" ]; then
173-
echoh "Installing remotely with ssh $RSH_ARGS"
174-
curl -fsSL https://code-server.dev/install.sh | prefix "$RSH_ARGS" ssh "$RSH_ARGS" sh -s -- "$ALL_FLAGS"
184+
echoh "Installing remotely with $RSH $RSH_ARGS"
185+
curl -fsSL https://code-server.dev/install.sh | prefix "$RSH_ARGS" "$RSH" "$RSH_ARGS" sh -s -- "$ALL_FLAGS"
175186
return
176187
fi
177188

0 commit comments

Comments
 (0)