Skip to content

Commit fc2274f

Browse files
Peter MarreckPeter Marreck
authored andcommitted
Align build script with unified Zig + Nix pattern
Use set -euo pipefail instead of manual error handling, match ReleaseSafe from flake.nix in zig fallback path.
1 parent eb8a49d commit fc2274f

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

build

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
if command -v nix >/dev/null 2>&1; then
5+
nix build "$@"
6+
mkdir -p zig-out/bin
7+
install -m755 result/bin/* zig-out/bin/
8+
else
9+
zig build -Doptimize=ReleaseSafe "$@"
10+
fi

0 commit comments

Comments
 (0)