@@ -26,31 +26,31 @@ Usage:
26
26
Echo the commands for the install process without running them.
27
27
--version X.X.X
28
28
Install a specific version instead of the latest.
29
- --method [detect | archive ]
29
+ --method [detect | standalone ]
30
30
Choose the installation method. Defaults to detect.
31
31
- detect detects the system package manager and tries to use it.
32
32
Full reference on the process is further below.
33
- - archive installs a binary release archive into ~/.local
33
+ - standalone installs a standalone release archive into ~/.local
34
34
Add ~/.local/bin to your \$ PATH to use it.
35
35
--prefix <dir>
36
- Sets the prefix used by binary release archives. Defaults to ~/.local
36
+ Sets the prefix used by standalone release archives. Defaults to ~/.local
37
37
The release is unarchived into ~/.local/lib/code-server-X.X.X
38
38
and the binary symlinked into ~/.local/bin/code-server
39
39
To install system wide pass ---prefix=/usr/local
40
40
41
41
- For Debian, Ubuntu and Raspbian it will install the latest deb package.
42
42
- For Fedora, CentOS, RHEL and openSUSE it will install the latest rpm package.
43
43
- For Arch Linux it will install the AUR package.
44
- - For any unrecognized Linux operating system it will install the latest binary
44
+ - For any unrecognized Linux operating system it will install the latest standalone
45
45
release into ~/.local
46
46
47
47
- For macOS it will install the Homebrew package.
48
- - If Homebrew is not installed it will install the latest binary release
48
+ - If Homebrew is not installed it will install the latest standalone release
49
49
into ~/.local
50
50
51
- - If ran on an architecture with no binary releases, it will install the
51
+ - If ran on an architecture with no releases, it will install the
52
52
npm package with yarn or npm.
53
- - We only have binary releases for amd64 and arm64 presently.
53
+ - We only have releases for amd64 and arm64 presently.
54
54
55
55
It will cache all downloaded assets into ~/.cache/code-server
56
56
@@ -65,12 +65,12 @@ echo_latest_version() {
65
65
echo " $version "
66
66
}
67
67
68
- echo_archive_postinstall () {
68
+ echo_standalone_postinstall () {
69
69
echo
70
70
cat << EOF
71
- Binary release has been installed into $ARCHIVE_INSTALL_PREFIX /lib/code-server-$VERSION
71
+ Standalone release has been installed into $STANDALONE_INSTALL_PREFIX /lib/code-server-$VERSION
72
72
Please extend your path to use code-server:
73
- PATH="$ARCHIVE_INSTALL_PREFIX /bin:\$ PATH"
73
+ PATH="$STANDALONE_INSTALL_PREFIX /bin:\$ PATH"
74
74
Then you can run:
75
75
code-server
76
76
EOF
@@ -94,7 +94,7 @@ main() {
94
94
unset \
95
95
DRY_RUN \
96
96
METHOD \
97
- ARCHIVE_INSTALL_PREFIX \
97
+ STANDALONE_INSTALL_PREFIX \
98
98
VERSION \
99
99
OPTIONAL
100
100
@@ -111,11 +111,11 @@ main() {
111
111
METHOD=" $( parse_arg " $@ " ) "
112
112
;;
113
113
--prefix)
114
- ARCHIVE_INSTALL_PREFIX =" $( parse_arg " $@ " ) "
114
+ STANDALONE_INSTALL_PREFIX =" $( parse_arg " $@ " ) "
115
115
shift
116
116
;;
117
117
--prefix=* )
118
- ARCHIVE_INSTALL_PREFIX =" $( parse_arg " $@ " ) "
118
+ STANDALONE_INSTALL_PREFIX =" $( parse_arg " $@ " ) "
119
119
;;
120
120
--version)
121
121
VERSION=" $( parse_arg " $@ " ) "
@@ -140,12 +140,12 @@ main() {
140
140
141
141
VERSION=" ${VERSION-$(echo_latest_version)} "
142
142
METHOD=" ${METHOD-detect} "
143
- if [ " $METHOD " != detect ] && [ " $METHOD " != archive ]; then
143
+ if [ " $METHOD " != detect ] && [ " $METHOD " != standalone ]; then
144
144
echoerr " Unknown install method \" $METHOD \" "
145
145
echoerr " Run with --help to see usage."
146
146
exit 1
147
147
fi
148
- ARCHIVE_INSTALL_PREFIX =" ${ARCHIVE_INSTALL_PREFIX -$HOME / .local} "
148
+ STANDALONE_INSTALL_PREFIX =" ${STANDALONE_INSTALL_PREFIX -$HOME / .local} "
149
149
150
150
OS=" $( os) "
151
151
if [ ! " $OS " ]; then
@@ -157,9 +157,9 @@ main() {
157
157
158
158
ARCH=" $( arch) "
159
159
if [ ! " $ARCH " ]; then
160
- if [ " $METHOD " = archive ]; then
161
- echoerr " No binary releases available for the architecture $( uname -m) ."
162
- echoerr ' Please rerun without the "--method archive " flag to install from npm.'
160
+ if [ " $METHOD " = standalone ]; then
161
+ echoerr " No releases available for the architecture $( uname -m) ."
162
+ echoerr ' Please rerun without the "--method standalone " flag to install from npm.'
163
163
exit 1
164
164
fi
165
165
echo " No precompiled releases for $( uname -m) ."
@@ -170,8 +170,8 @@ main() {
170
170
CACHE_DIR=" $( echo_cache_dir) "
171
171
mkdir -p " $CACHE_DIR "
172
172
173
- if [ " $METHOD " = archive ]; then
174
- install_archive
173
+ if [ " $METHOD " = standalone ]; then
174
+ install_standalone
175
175
return
176
176
fi
177
177
@@ -190,7 +190,7 @@ main() {
190
190
;;
191
191
* )
192
192
echo " Unsupported package manager."
193
- install_archive
193
+ install_standalone
194
194
;;
195
195
esac
196
196
}
@@ -256,7 +256,7 @@ install_macos() {
256
256
257
257
echo " Homebrew not installed."
258
258
259
- install_archive
259
+ install_standalone
260
260
}
261
261
262
262
install_deb () {
@@ -300,31 +300,31 @@ install_aur() {
300
300
echo_systemd_postinstall
301
301
}
302
302
303
- install_archive () {
304
- echo " Installing binary release archive v$VERSION "
303
+ install_standalone () {
304
+ echo " Installing standalone release archive v$VERSION "
305
305
echo
306
306
307
307
fetch " https://github.com/cdr/code-server/releases/download/v$VERSION /code-server-$VERSION -$OS -$ARCH .tar.gz" \
308
308
" $CACHE_DIR /code-server-$VERSION -$OS -$ARCH .tar.gz"
309
309
310
310
sh_c=" sh_c"
311
- if [ ! -w " $ARCHIVE_INSTALL_PREFIX " ]; then
311
+ if [ ! -w " $STANDALONE_INSTALL_PREFIX " ]; then
312
312
sh_c=" sudo_sh_c"
313
313
fi
314
314
315
- if [ -e " $ARCHIVE_INSTALL_PREFIX /lib/code-server-$VERSION " ]; then
315
+ if [ -e " $STANDALONE_INSTALL_PREFIX /lib/code-server-$VERSION " ]; then
316
316
echo
317
- echo " code-server-$VERSION is already installed at $ARCHIVE_INSTALL_PREFIX /lib/code-server-$VERSION "
317
+ echo " code-server-$VERSION is already installed at $STANDALONE_INSTALL_PREFIX /lib/code-server-$VERSION "
318
318
echo " Remove it to reinstall."
319
319
exit 0
320
320
fi
321
321
322
- " $sh_c " mkdir -p " $ARCHIVE_INSTALL_PREFIX /lib" " $ARCHIVE_INSTALL_PREFIX /bin"
323
- " $sh_c " tar -C " $ARCHIVE_INSTALL_PREFIX /lib" -xzf " $CACHE_DIR /code-server-$VERSION -$OS -$ARCH .tar.gz"
324
- " $sh_c " mv -f " $ARCHIVE_INSTALL_PREFIX /lib/code-server-$VERSION -$OS -$ARCH " " $ARCHIVE_INSTALL_PREFIX /lib/code-server-$VERSION "
325
- " $sh_c " ln -fs " $ARCHIVE_INSTALL_PREFIX /lib/code-server-$VERSION /bin/code-server" " $ARCHIVE_INSTALL_PREFIX /bin/code-server"
322
+ " $sh_c " mkdir -p " $STANDALONE_INSTALL_PREFIX /lib" " $STANDALONE_INSTALL_PREFIX /bin"
323
+ " $sh_c " tar -C " $STANDALONE_INSTALL_PREFIX /lib" -xzf " $CACHE_DIR /code-server-$VERSION -$OS -$ARCH .tar.gz"
324
+ " $sh_c " mv -f " $STANDALONE_INSTALL_PREFIX /lib/code-server-$VERSION -$OS -$ARCH " " $STANDALONE_INSTALL_PREFIX /lib/code-server-$VERSION "
325
+ " $sh_c " ln -fs " $STANDALONE_INSTALL_PREFIX /lib/code-server-$VERSION /bin/code-server" " $STANDALONE_INSTALL_PREFIX /bin/code-server"
326
326
327
- echo_archive_postinstall
327
+ echo_standalone_postinstall
328
328
}
329
329
330
330
install_npm () {
0 commit comments