build: add freebsd support to zig wrapper
This commit is contained in:
parent
af68d4386d
commit
6adda64efd
1 changed files with 8 additions and 0 deletions
8
zig
8
zig
|
@ -13,6 +13,11 @@ if [ "$OS" == "Linux" ] ; then
|
||||||
OS=linux
|
OS=linux
|
||||||
elif [ "$OS" == "Darwin" ] ; then
|
elif [ "$OS" == "Darwin" ] ; then
|
||||||
OS=macos
|
OS=macos
|
||||||
|
elif [ "$OS" == "FreeBSD" ] ; then
|
||||||
|
OS=freebsd
|
||||||
|
if [ "$ARCH" == "amd64" ] ; then
|
||||||
|
ARCH=x86_64
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$ARCH" == "arm64" ] ; then
|
if [ "$ARCH" == "arm64" ] ; then
|
||||||
|
@ -41,6 +46,9 @@ get_zig() {
|
||||||
mkdir -p "$ZIGDIR"
|
mkdir -p "$ZIGDIR"
|
||||||
cd "$ZIGDIR"
|
cd "$ZIGDIR"
|
||||||
TARBALL="https://ziglang.org/builds/$ZIGVER.tar.xz"
|
TARBALL="https://ziglang.org/builds/$ZIGVER.tar.xz"
|
||||||
|
if [ "$OS" == "freebsd" ] ; then
|
||||||
|
TARBALL="https://ziglang.org/download/$VERSION/$ZIGVER.tar.xz"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -d "$ZIGVER" ] ; then
|
if [ ! -d "$ZIGVER" ] ; then
|
||||||
curl "$TARBALL" | tar -xJ
|
curl "$TARBALL" | tar -xJ
|
||||||
|
|
Loading…
Add table
Reference in a new issue