Archived
1
0
This repository has been archived on 2024-09-09. You can view files and clone it, but cannot push or open issues or pull requests.
code-server/ci/build/code-server.sh

29 lines
603 B
Bash
Raw Permalink Normal View History

#!/bin/sh
set -eu
2020-05-27 22:39:17 +02:00
# This script is intended to be bundled into the standalone releases.
# Runs code-server with the bundled node binary.
2020-02-25 23:20:47 +01:00
_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")"
2020-06-04 00:23:42 +02:00
dirname "$bin_dir"
2020-04-22 23:45:53 +02:00
}
2020-02-25 23:20:47 +01:00
ROOT="$(root)"
2020-05-28 06:49:37 +02:00
exec "$ROOT/lib/node" "$ROOT" "$@"