diff options
| author | Loek Le Blansch <loek@pipeframe.xyz> | 2026-01-16 20:03:07 +0100 |
|---|---|---|
| committer | Loek Le Blansch <loek@pipeframe.xyz> | 2026-01-16 20:03:07 +0100 |
| commit | 115ac49aa95caa4e648629f55ae287263a48655c (patch) | |
| tree | a6feb177733475c85e13a5f2e2f43bdd590a5b83 /.local/share/bin/mk | |
| parent | cbc28cd4f307804b84e8c96b4717d85f6b0ed008 (diff) | |
Diffstat (limited to '.local/share/bin/mk')
| -rwxr-xr-x | .local/share/bin/mk | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/.local/share/bin/mk b/.local/share/bin/mk index 54b6908..83baf01 100755 --- a/.local/share/bin/mk +++ b/.local/share/bin/mk @@ -27,16 +27,17 @@ mode_cmake() { # re-run configuration if fresh or CMakeLists was changed if [ ! -e "$builddir/build.ninja" ] || [ "CMakeLists.txt" -nt "$builddir/build.ninja" ] ; then - cmake --log-level WARNING -B "$builddir" + cmake --log-level WARNING -B "$builddir" || exit $? fi # build - cmake --build "$builddir" -- "$@" || exit $? + cmake --build "$builddir" -- "$@" + ec=$? # generate vim tags (continue after mk exits) - ninja -C "$builddir" -t deps | sed -n 's/^ \{4\}//p' | sort -u | ctags -L - -f "$builddir/tags" & + ninja -C "$builddir" -t deps | sed -n 's/^ \{4\}//p' | sort -u | ctags -L - -f "$builddir/tags" 2>/dev/null & - exit 0 + exit $ec } [ -e "CMakeLists.txt" ] && mode_cmake "$@" |