From 15a820e9ad47fa61b6010fac8dbd58c6ea853f81 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Thu, 11 Mar 2021 22:00:38 +0100 Subject: [PATCH] Ports: Use SERENITY_ARCH in .port_include.sh if already defined Instead of always hardcoding i686, only use it as fallback value as we already do in other scripts. --- Ports/.port_include.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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"