Ports: Use absolute path of script

The relative paths are not valid inside a port build directory.
This makes target_env source .hosted_defs.sh correctly.
This commit is contained in:
Jan200101 2022-12-28 00:39:55 +01:00 committed by Andreas Kling
parent b85f4ab66a
commit 058a39c6fc
Notes: sideshowbarker 2024-07-18 05:37:06 +09:00
2 changed files with 2 additions and 2 deletions

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash
SCRIPT="$(dirname "${0}")"
SCRIPT="$(realpath $(dirname "${BASH_SOURCE[0]}"))"
export SERENITY_ARCH="${SERENITY_ARCH:-x86_64}"
export SERENITY_TOOLCHAIN="${SERENITY_TOOLCHAIN:-GNU}"

View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -eu
SCRIPT="$(dirname "${0}")"
SCRIPT="$(realpath $(dirname "${0}"))"
if [ -z "${SERENITY_STRIPPED_ENV:-}" ]; then
exec "${SCRIPT}/.strip_env.sh" "${@}"