aboutsummaryrefslogtreecommitdiff
path: root/scripts/ue_build_linux/ue_build.sh
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2025-10-06 13:37:39 +0200
committerGitHub Enterprise <[email protected]>2025-10-06 13:37:39 +0200
commitca5ae7c4756ea82b13ec571d33c8da59cd391b92 (patch)
treea4453c59504b78cfbe3bffe9353c3b36edc9bcfb /scripts/ue_build_linux/ue_build.sh
parentfixed issue in compactcas.restart test due to std::vector<bool> (#559) (diff)
downloadzen-ca5ae7c4756ea82b13ec571d33c8da59cd391b92.tar.xz
zen-ca5ae7c4756ea82b13ec571d33c8da59cd391b92.zip
added default Linux UE toolchain directory (#558)
Instead of forcing user to specify a suitable directory for the UE toolchain, we offer a default which matches what the Github runners use and which is also covered by the root `.gitignore` file
Diffstat (limited to 'scripts/ue_build_linux/ue_build.sh')
-rwxr-xr-xscripts/ue_build_linux/ue_build.sh20
1 files changed, 13 insertions, 7 deletions
diff --git a/scripts/ue_build_linux/ue_build.sh b/scripts/ue_build_linux/ue_build.sh
index 4613dd5ec..690f9f661 100755
--- a/scripts/ue_build_linux/ue_build.sh
+++ b/scripts/ue_build_linux/ue_build.sh
@@ -1,22 +1,28 @@
#!/bin/bash
+SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
+ZEN_ROOT=$(realpath $SCRIPT_DIR/../..)
+
die() { echo ERROR: $1; exit 1; }
-# Validate input
-if [ -z $1 ]; then
- echo "usage: $0 <ue_toolchain_dir>"
- exit 1
+if [[ $1 == "--help" ]]; then
+ echo "usage: $0 <ue_toolchain_dir> (defaults to ${ZEN_ROOT}/.tmp-ue-toolchain)"
+ exit
fi
-if ! [ -d $1 ]; then
+toolchain_dir="${1:-${ZEN_ROOT}/.tmp-ue-toolchain}"
+
+# Validate input
+
+if ! [ -d $toolchain_dir ]; then
die "$1 is not a directory"
fi
-if ! [ -e $1/bin/clang++ ]; then
+if ! [ -e $toolchain_dir/bin/clang++ ]; then
die "$1/bin/clang++ does not exist"
fi
-export UE_TOOLCHAIN_DIR=$(realpath $1)
+export UE_TOOLCHAIN_DIR=$(realpath $toolchain_dir)
export CC="clang"
export CXX="clang++"
export LD="clang++"