File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -526,13 +526,16 @@ func downloadScript(codeServerPath string) string {
526526pkill -f %v || true
527527mkdir -p ~/.local/share/code-server %v
528528cd %v
529- curlflags="-o latest-linux"
530- if [ -f latest-linux ]; then
531- curlflags="$curlflags -z latest-linux"
529+ wget https://github.com/cdr/code-server/releases -O codeserver.rel
530+ curlurl=$(grep '/*-linux-x86_64.tar.gz' codeserver.rel | head -n 1 | sed -r 's/.* href="([^"]+)" .*/https:\/\/github.com\1/')
531+ curlflags="-L -o latest-linux.tar.gz"
532+ if [ -f latest-linux.tar.gz ]; then
533+ curlflags="$curlflags -z latest-linux.tar.gz"
532534fi
533- curl $curlflags https://codesrv-ci.cdr.sh/latest-linux
535+ curl $curlflags $curlurl
536+ tar xf latest-linux.tar.gz
534537[ -f %v ] && rm %v
535- ln latest-linux %v
538+ ln $(ls -r -1 */code-server | head -n 1) %v
536539chmod +x %v` ,
537540 codeServerPath ,
538541 filepath .Dir (codeServerPath ),
You can’t perform that action at this time.
0 commit comments