diff options
Diffstat (limited to 'scripts/code-server.sh')
-rwxr-xr-x | scripts/code-server.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/scripts/code-server.sh b/scripts/code-server.sh new file mode 100755 index 00000000000..b1c266ec2e4 --- /dev/null +++ b/scripts/code-server.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +if [[ "$OSTYPE" == "darwin"* ]]; then + realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; } + ROOT=$(dirname $(dirname $(realpath "$0"))) +else + ROOT=$(dirname $(dirname $(readlink -f $0))) +fi + +function code() { + cd $ROOT + + # Sync built-in extensions + yarn download-builtin-extensions + + # Load remote node + yarn gulp node + + NODE=$(node build/lib/node.js) + + NODE_ENV=development \ + VSCODE_DEV=1 \ + $NODE ./resources/server/bin-dev/code-server.js "$@" +} + +code "$@" |