@@ -24,7 +24,7 @@ ${not_curl_usage-}
24
24
Usage:
25
25
26
26
$arg0 [--dry-run] [--version X.X.X] [--method detect] \
27
- [--prefix ~/.local] [user@host]
27
+ [--prefix ~/.local] [--rsh ssh] [ user@host]
28
28
29
29
--dry-run
30
30
Echo the commands for the install process without running them.
45
45
and the binary symlinked into ~/.local/bin/code-server
46
46
To install system wide pass ---prefix=/usr/local
47
47
48
+ --rsh <bin>
49
+ Specifies the remote shell for remote installation. Defaults to ssh.
50
+
48
51
- For Debian, Ubuntu and Raspbian it will install the latest deb package.
49
52
- For Fedora, CentOS, RHEL and openSUSE it will install the latest rpm package.
50
53
- For Arch Linux it will install the AUR package.
@@ -109,7 +112,8 @@ main() {
109
112
VERSION \
110
113
OPTIONAL \
111
114
ALL_FLAGS \
112
- SSH_ARGS
115
+ RSH_ARGS \
116
+ RSH
113
117
114
118
ALL_FLAGS=" "
115
119
while [ " $# " -gt 0 ]; do
@@ -144,6 +148,13 @@ main() {
144
148
--version=* )
145
149
VERSION=" $( parse_arg " $@ " ) "
146
150
;;
151
+ --rsh)
152
+ RSH=" $( parse_arg " $@ " ) "
153
+ shift
154
+ ;;
155
+ --rsh=* )
156
+ RSH=" $( parse_arg " $@ " ) "
157
+ ;;
147
158
-h | --h | -help | --help)
148
159
usage
149
160
exit 0
@@ -152,7 +163,7 @@ main() {
152
163
shift
153
164
# We remove the -- added above.
154
165
ALL_FLAGS=" ${ALL_FLAGS% --} "
155
- SSH_ARGS =" $* "
166
+ RSH_ARGS =" $* "
156
167
break
157
168
;;
158
169
-* )
@@ -161,17 +172,18 @@ main() {
161
172
exit 1
162
173
;;
163
174
* )
164
- SSH_ARGS =" $* "
175
+ RSH_ARGS =" $* "
165
176
break
166
177
;;
167
178
esac
168
179
169
180
shift
170
181
done
171
182
172
- if [ " ${SSH_ARGS-} " ]; then
173
- echoh " Installing remotely with ssh $SSH_ARGS "
174
- curl -fsSL https://code-server.dev/install.sh | prefix " $SSH_ARGS " ssh " $SSH_ARGS " sh -s -- " $ALL_FLAGS "
183
+ if [ " ${RSH_ARGS-} " ]; then
184
+ RSH=" ${RSH-ssh} "
185
+ echoh " Installing remotely with $RSH $RSH_ARGS "
186
+ curl -fsSL https://code-server.dev/install.sh | prefix " $RSH_ARGS " " $RSH " " $RSH_ARGS " sh -s -- " $ALL_FLAGS "
175
187
return
176
188
fi
177
189
0 commit comments