3ac2307b5c
* fix: remove deprecated symlink * refactor: remove deprecation notice * fixup! refactor: remove deprecation notice * fix: add node to path * fixup: shellcheck * Update src/node/wrapper.ts Co-authored-by: Asher <ash@coder.com> * fixup!: fix: remove deprecated symlink * Update ci/build/build-vscode.sh Co-authored-by: Asher <ash@coder.com> * Update ci/build/build-vscode.sh Co-authored-by: Asher <ash@coder.com> * fixup: use NODE_EXEC_PATh * Update ci/build/build-vscode.sh Co-authored-by: Asher <ash@coder.com> Co-authored-by: Asher <ash@coder.com>
29 lines
603 B
Bash
Executable File
29 lines
603 B
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
|
|
# This script is intended to be bundled into the standalone releases.
|
|
# Runs code-server with the bundled node binary.
|
|
|
|
_realpath() {
|
|
# See https://github.com/coder/code-server/issues/1537 on why no realpath or readlink -f.
|
|
|
|
script="$1"
|
|
cd "$(dirname "$script")"
|
|
|
|
while [ -L "$(basename "$script")" ]; do
|
|
script="$(readlink "$(basename "$script")")"
|
|
cd "$(dirname "$script")"
|
|
done
|
|
|
|
echo "$PWD/$(basename "$script")"
|
|
}
|
|
|
|
root() {
|
|
script="$(_realpath "$0")"
|
|
bin_dir="$(dirname "$script")"
|
|
dirname "$bin_dir"
|
|
}
|
|
|
|
ROOT="$(root)"
|
|
exec "$ROOT/lib/node" "$ROOT" "$@"
|