summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2023-09-06 16:51:01 -0400
committerMatt Turner <mattst88@gmail.com>2023-09-06 16:51:01 -0400
commit108e36aa107b273b6a06ab1c2ed0c6ca981d9ab3 (patch)
tree782c9c4b2a489b4c098fb4ef19f3e40228019171
parent642975c2949cbcc362c6e6260936952f1f1a5cb8 (diff)
nj: Pull in fixes to pass through error code
-rw-r--r--README.md2
-rwxr-xr-xnj7
2 files changed, 6 insertions, 3 deletions
diff --git a/README.md b/README.md
index 94db353..c2573b3 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@ A collection of scripts to build and test [Mesa](https://www.mesa3d.org/) withou
## Scripts
-- [nj](nj) - Run [ninja](https://github.com/ninja-build/ninja) from anywhere in the project git repository
+- [nj](nj) - Run [ninja](https://github.com/ninja-build/ninja) from anywhere in the project git repository. (upstream: [nj repo](gitlab.freedesktop.org/kwg/nj))
- [mesa-run](mesa-run) - helper script. Not used directly. Requires [jq](https://github.com/jqlang/jq)
- [mesa-debug](mesa-debug) - Debug build
- [mesa-debug-asan](mesa-debug-asan) - Debug build with [AddressSanitizer](https://github.com/google/sanitizers/wiki/AddressSanitizer)
diff --git a/nj b/nj
index 7a29e39..c2d094c 100755
--- a/nj
+++ b/nj
@@ -73,5 +73,8 @@ cd "$builddir"
extratargets="$(cat extratargets 2>/dev/null)"
targets="${@:-all $extratargets}"
-ninja $targets
-[[ "$targets" == all* ]] && [ -e install ] && ninja install > /dev/null
+ninja $targets || exit $?
+
+if [[ "$targets" == all* ]] && [ -e install ]; then
+ ninja install > /dev/null
+fi