File tree 1 file changed +17
-3
lines changed
1 file changed +17
-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 [true | false (default) ]
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:- false} " = " true" ]; 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 "
@@ -170,6 +177,13 @@ main() {
170
177
--version=* )
171
178
VERSION=" $( parse_arg " $@ " ) "
172
179
;;
180
+ --edge)
181
+ EDGE=" $( parse_arg " $@ " ) "
182
+ shift
183
+ ;;
184
+ --edge=* )
185
+ EDGE=" $( parse_arg " $@ " ) "
186
+ ;;
173
187
--rsh)
174
188
RSH=" $( parse_arg " $@ " ) "
175
189
shift
You can’t perform that action at this time.
0 commit comments