File tree 1 file changed +14
-3
lines changed
1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ The remote host must have internet access.
23
23
${not_curl_usage-}
24
24
Usage:
25
25
26
- $arg0 [--dry-run] [--version X.X.X] [--method detect] \
26
+ $arg0 [--dry-run] [--version X.X.X] [--edge] [-- method detect] \
27
27
[--prefix ~/.local] [--rsh ssh] [user@host]
28
28
29
29
--dry-run
32
32
--version X.X.X
33
33
Install a specific version instead of the latest.
34
34
35
+ --edge
36
+ Install the latest edge version instead of the latest stable version.
37
+
35
38
--method [detect | standalone]
36
39
Choose the installation method. Defaults to detect.
37
40
- detect detects the system package manager and tries to use it.
71
74
}
72
75
73
76
echo_latest_version () {
74
- # https://gist.github.com/lukechilds/a83e1d7127b78fef38c2914c4ececc3c#gistcomment-2758860
75
- version=" $( curl -fsSLI -o /dev/null -w " %{url_effective}" https://github.com/cdr/code-server/releases/latest) "
77
+ if [ " ${EDGE-} " ]; then
78
+ version=" $( curl -fsSL https://api.github.com/repos/cdr/code-server/releases | awk ' match($0,/.*"html_url": "(.*\/releases\/tag\/.*)".*/)' | head -n 1 | awk -F ' "' ' {print $4}' ) "
79
+ else
80
+ # https://gist.github.com/lukechilds/a83e1d7127b78fef38c2914c4ececc3c#gistcomment-2758860
81
+ version=" $( curl -fsSLI -o /dev/null -w " %{url_effective}" https://github.com/cdr/code-server/releases/latest) "
82
+ fi
76
83
version=" ${version# https:// github.com/ cdr/ code-server/ releases/ tag/ } "
77
84
version=" ${version# v} "
78
85
echo " $version "
@@ -135,6 +142,7 @@ main() {
135
142
OPTIONAL \
136
143
ALL_FLAGS \
137
144
RSH_ARGS \
145
+ EDGE \
138
146
RSH
139
147
140
148
ALL_FLAGS=" "
@@ -170,6 +178,9 @@ main() {
170
178
--version=* )
171
179
VERSION=" $( parse_arg " $@ " ) "
172
180
;;
181
+ --edge)
182
+ EDGE=1
183
+ ;;
173
184
--rsh)
174
185
RSH=" $( parse_arg " $@ " ) "
175
186
shift
You can’t perform that action at this time.
0 commit comments