mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 04:09:28 +00:00
server bin cleanup
This commit is contained in:
28
resources/server/bin-dev/code-server.sh
Executable file
28
resources/server/bin-dev/code-server.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; }
|
||||
ROOT=$(dirname $(dirname $(dirname $(dirname $(realpath "$0")))))
|
||||
else
|
||||
ROOT=$(dirname $(dirname $(dirname $(dirname $(readlink -f $0)))))
|
||||
fi
|
||||
|
||||
function code() {
|
||||
cd $ROOT
|
||||
|
||||
# Sync built-in extensions
|
||||
yarn download-builtin-extensions
|
||||
|
||||
NODE=$(node build/lib/node.js)
|
||||
|
||||
# Download nodejs
|
||||
if [ ! -f $NODE ]; then
|
||||
yarn gulp node
|
||||
fi
|
||||
|
||||
NODE_ENV=development \
|
||||
VSCODE_DEV=1 \
|
||||
$NODE "$ROOT/out/vs/server/main.js" "$@"
|
||||
}
|
||||
|
||||
code "$@"
|
||||
Reference in New Issue
Block a user