mirror of
https://git.tuxpa.in/a/code-server.git
synced 2024-12-28 13:15:25 +00:00
11d7932968
- Instead we now use CentOS 7 for the static build to guarantee that we only depend on libc v2.17 - For macOS we now pull in a static node binary and bundle that instead.
36 lines
800 B
Bash
Executable File
36 lines
800 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() {
|
|
if [ "$(uname)" = "Linux" ]; then
|
|
readlink -f "$1"
|
|
return
|
|
fi
|
|
|
|
# See https://github.com/cdr/code-server/issues/1537
|
|
if [ "$(uname)" = "Darwin" ]; then
|
|
script="$1"
|
|
if [ -L "$script" ]; then
|
|
while [ -L "$script" ]; do
|
|
# We recursively read the symlink, which may be relative from $script.
|
|
script="$(readlink "$script")"
|
|
cd "$(dirname "$script")"
|
|
done
|
|
else
|
|
cd "$(dirname "$script")"
|
|
fi
|
|
|
|
echo "$PWD/$(basename "$script")"
|
|
return
|
|
fi
|
|
|
|
echo "Unsupported OS $(uname)" >&2
|
|
exit 1
|
|
}
|
|
|
|
ROOT="$(dirname "$(dirname "$(_realpath "$0")")")"
|
|
exec "$ROOT/lib/node" "$ROOT" "$@"
|