diff options
author | Karel Kočí <cynerd@email.cz> | 2022-09-29 11:23:08 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2022-09-29 11:23:08 +0200 |
commit | 23472c9673e2fffbf4e34f2fc05739570b603f8c (patch) | |
tree | 55ebd7d73b6749c7bd779538030faf6d1d2c25d3 /shellrc.d/dev | |
parent | 82b9e5a554f7ab1229ab6cd57cec24f46536e2de (diff) | |
download | shellrc-23472c9673e2fffbf4e34f2fc05739570b603f8c.tar.gz shellrc-23472c9673e2fffbf4e34f2fc05739570b603f8c.tar.bz2 shellrc-23472c9673e2fffbf4e34f2fc05739570b603f8c.zip |
dev: include only if appropriate tool is available
Diffstat (limited to 'shellrc.d/dev')
-rw-r--r-- | shellrc.d/dev | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/shellrc.d/dev b/shellrc.d/dev index 148ef24..5206eb5 100644 --- a/shellrc.d/dev +++ b/shellrc.d/dev @@ -1,5 +1,7 @@ # vim: ft=sh: +if command -v valgrind >/dev/null; then + memcheck() { valgrind --track-fds=yes --leak-check=full --track-origins=yes "$@" } @@ -8,6 +10,11 @@ massif() { valgrind --tool=massif "$@" } +fi + + +if command -v meson >/dev/null; then + _meson_setup() { if [ ! -f "build/build.ninja" ]; then meson setup build @@ -28,3 +35,5 @@ mdist() { _meson_setup meson dist -C build --formats xztar,gztar,zip "$@" } + +fi |