Skip to content

Instantly share code, notes, and snippets.

@SBell6hf
Created November 20, 2021 05:48
Show Gist options
  • Save SBell6hf/615335bd417adbebc2a8660b76cc8af2 to your computer and use it in GitHub Desktop.
Save SBell6hf/615335bd417adbebc2a8660b76cc8af2 to your computer and use it in GitHub Desktop.
VSCode Server download link generator
echo "################ LEGAL INFO #################"
echo "# According to Microsoft's license, you may #"
echo "# only use VSCode Server with Visual Studio #"
echo "# family products. #"
echo "# If you want to use it on a remote machine #"
echo "# in order to code in a web browser, please #"
echo "# go to https://github.com/gitpod-io/openvs #"
echo "# code-server. #"
echo "#############################################"
echo
read -p "Tag (commit:XXXX or latest by default): " tag
if [ "$tag" == "" ]; then
tag="latest"
fi
serverName="server"
read -p "Platform (Linux(L), Darwin(D), Windows(W)): " platform
if [ "$platform" == "L" -o "$platform" == "l" ]; then
serverName="$serverName-linux"
read -p "Architecture (arm64(a), x86-64(6), armv7l(l), armv8l(l)): " arch
if [ "$arch" == "a" -o "$arch" == "A" ]; then
serverName="$serverName-arm64"
elif [ "$arch" == "6" ]; then
serverName="$serverName-x64"
elif [ "$arch" == "l" -o "$arch" == "L" ]; then
serverName="$serverName-armhf"
else
exit 22
fi
elif [ "$platform" == "D" -o "$platform" == "d" ]; then
serverName="$serverName-darwin"
elif [ "$platform" == "W" -o "$platform" == "w" ]; then
serverName="$serverName-win32"
read -p "Architecture (x86-64(6), i386(3)): " arch
if [ "$arch" == "6" ]; then
serverName="$serverName-x64"
elif [ "$arch" != "3" ]; then
exit 22
fi
else
exit 22
fi
read -p "Enable web access (Y/n): " web
if [ "$web" != "n" ]; then
serverName="$serverName-web"
fi
read -p "Quality (stable(S), insider(i)): " quality
if [ "$quality" == "I" -o "$quality" == "i" ]; then
quality="insider"
else
quality="stable"
fi
echo "Download link: https://update.code.visualstudio.com/$tag/$serverName/$quality"
echo 'Avaliable server options:
e.serverOptions = {
port: {
type: "string"
},
connectionToken: {
type: "string"
},
"connection-secret": {
type: "string",
description: P.localize(0, null)
},
host: {
type: "string"
},
"socket-path": {
type: "string"
},
driver: {
type: "string"
},
"start-server": {
type: "boolean"
},
"print-startup-performance": {
type: "boolean"
},
"print-ip-address": {
type: "boolean"
},
"disable-websocket-compression": {
type: "boolean"
},
fileWatcherPolling: {
type: "string"
},
"enable-remote-auto-shutdown": {
type: "boolean"
},
"remote-auto-shutdown-without-delay": {
type: "boolean"
},
"without-browser-env-var": {
type: "boolean"
},
"disable-telemetry": y.OPTIONS["disable-telemetry"],
"extensions-dir": y.OPTIONS["extensions-dir"],
"extensions-download-dir": y.OPTIONS["extensions-download-dir"],
"install-extension": y.OPTIONS["install-extension"],
"install-builtin-extension": y.OPTIONS["install-builtin-extension"],
"uninstall-extension": y.OPTIONS["uninstall-extension"],
"locate-extension": y.OPTIONS["locate-extension"],
"list-extensions": y.OPTIONS["list-extensions"],
force: y.OPTIONS.force,
"show-versions": y.OPTIONS["show-versions"],
category: y.OPTIONS.category,
"do-not-sync": y.OPTIONS["do-not-sync"],
"force-disable-user-env": y.OPTIONS["force-disable-user-env"],
folder: {
type: "string"
},
workspace: {
type: "string"
},
"web-user-data-dir": {
type: "string"
},
"use-host-proxy": {
type: "string"
},
"enable-sync": {
type: "boolean"
},
"github-auth": {
type: "string"
},
log: {
type: "string"
},
logsPath: {
type: "string"
},
_: y.OPTIONS._
}'
echo "Example: ./server.sh --start-server --host=127.0.0.1 --port=1234 --connectionToken TOKEN --disable-telemetry"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment