server bin cleanup

This commit is contained in:
Martin Aeschlimann
2022-01-11 16:34:28 +01:00
parent 1942718a4a
commit f4ba7dd12b
18 changed files with 78 additions and 26 deletions

View 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 "$@"