fix zig wrapper on macos

This commit is contained in:
CJ van den Berg 2024-02-20 18:31:44 +01:00
parent acec3e78ab
commit 0b0200aecc

12
zig
View file

@ -6,7 +6,17 @@ ARCH=$(uname -m)
BASEDIR="$(cd "$(dirname "$0")" && pwd)"
ZIGDIR=$BASEDIR/.cache/zig
VERSION=$(< build.zig.version)
ZIGVER="zig-linux-$ARCH-$VERSION"
OS=$(uname)
if [ "$OS" == "Linux" ] ; then
OS=linux
elif [ "$OS" == "Darwin" ] ; then
OS=macos
fi
ZIGVER="zig-$OS-$ARCH-$VERSION"
ZIG=$ZIGDIR/$ZIGVER/zig
if [ "$1" == "update" ] ; then