diff --git a/Ports/.port_include.sh b/Ports/.port_include.sh index 220c506a898..a70af4d9aa6 100755 --- a/Ports/.port_include.sh +++ b/Ports/.port_include.sh @@ -1,15 +1,15 @@ #!/usr/bin/env bash set -eu -SCRIPT=`dirname $0` -export SERENITY_ROOT=`realpath $SCRIPT/../` -export SERENITY_ARCH=i686 +SCRIPT="$(dirname "${0}")" +export SERENITY_ROOT="$(realpath "${SCRIPT}/../")" +export SERENITY_ARCH="${SERENITY_ARCH:-i686}" export SERENITY_BUILD_DIR="${SERENITY_ROOT}/Build/${SERENITY_ARCH}" -export CC=i686-pc-serenity-gcc -export CXX=i686-pc-serenity-g++ -export AR=i686-pc-serenity-ar -export RANLIB=i686-pc-serenity-ranlib -export PATH=$SERENITY_ROOT/Toolchain/Local/i686/bin:$PATH +export CC="${SERENITY_ARCH}-pc-serenity-gcc" +export CXX="${SERENITY_ARCH}-pc-serenity-g++" +export AR="${SERENITY_ARCH}-pc-serenity-ar" +export RANLIB="${SERENITY_ARCH}-pc-serenity-ranlib" +export PATH="${SERENITY_ROOT}/Toolchain/Local/${SERENITY_ARCH}/bin:${PATH}" packagesdb="${SERENITY_BUILD_DIR}/packages.db"