~andrewrk/ziglang

remove bash dependency (verified with shellcheck) v1 PROPOSED

Noam Preil: 1
 remove bash dependency (verified with shellcheck)

 1 files changed, 16 insertions(+), 4 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~andrewrk/ziglang/patches/14326/mbox | git am -3
Learn more about email & git

[PATCH] remove bash dependency (verified with shellcheck) Export this patch

---
 build | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/build b/build
index 01df883a4..1d646840b 100755
--- a/build
@@ -13,10 +13,22 @@ TARGET_OS_AND_ABI=${TARGET#*-} # Example: linux-gnu

# Here we map the OS from the target triple to the value that CMake expects.
TARGET_OS_CMAKE=${TARGET_OS_AND_ABI%-*} # Example: linux
TARGET_OS_CMAKE="${TARGET_OS_CMAKE/macos/Darwin}"
TARGET_OS_CMAKE="${TARGET_OS_CMAKE/freebsd/FreeBSD}"
TARGET_OS_CMAKE="${TARGET_OS_CMAKE/windows/Windows}"
TARGET_OS_CMAKE="${TARGET_OS_CMAKE/linux/Linux}"
if [ "$TARGET_OS_CMAKE" = "macos" ]
then
	TARGET_OS_CMAKE=Darwin
fi
if [ "$TARGET_OS_CMAKE" = "freebsd" ]
then
	TARGET_OS_CMAKE=FreeBSD
fi
if [ "$TARGET_OS_CMAKE" = "windows" ]
then
	TARGET_OS_CMAKE=Windows
fi
if [ "$TARGET_OS_CMAKE" = "linux" ]
then
	TARGET_OS_CMAKE=Linux
fi

# First build the libraries for Zig to link against, as well as native `llvm-tblgen`.
mkdir -p "$ROOTDIR/out/build-llvm-host"
-- 
2.28.0