Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/scripts/code-web.sh
3520 views
1
#!/usr/bin/env bash
2
3
if [[ "$OSTYPE" == "darwin"* ]]; then
4
realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; }
5
ROOT=$(dirname $(dirname $(realpath "$0")))
6
else
7
ROOT=$(dirname $(dirname $(readlink -f $0)))
8
fi
9
10
function code() {
11
cd $ROOT
12
13
# Sync built-in extensions
14
npm run download-builtin-extensions
15
16
NODE=$(node build/lib/node.js)
17
if [ ! -e $NODE ];then
18
# Load remote node
19
npm run gulp node
20
fi
21
22
NODE=$(node build/lib/node.js)
23
24
$NODE ./scripts/code-web.js "$@"
25
}
26
27
code "$@"
28
29