darwin server script: do not use python. Fixes microsoft/vscode-remote-release#6442

This commit is contained in:
Martin Aeschlimann 2022-03-16 10:50:27 +01:00
parent bea4702933
commit 5aee6939e2
No known key found for this signature in database
GPG key ID: 2609A01E695523E3

View file

@ -7,7 +7,16 @@ case "$1" in
--inspect*) INSPECT="$1"; shift;;
esac
function realpath() { python -c "import os,sys; print(os.path.realpath(sys.argv[1]))" "$0"; }
ROOT=$(dirname $(dirname $(realpath "$0")))
function realdir() {
SOURCE=$1
while [ -h "$SOURCE" ]; do
DIR=$( dirname "$SOURCE" )
SOURCE=$(readlink "$SOURCE")
[[ $SOURCE != /* ]] && SOURCE=$DIR/$SOURCE
done
echo "$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
}
ROOT=$(dirname $(realdir "$0"))
"$ROOT/node" ${INSPECT:-} "$ROOT/out/server-main.js" "$@"