From 23472c9673e2fffbf4e34f2fc05739570b603f8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Thu, 29 Sep 2022 11:23:08 +0200 Subject: dev: include only if appropriate tool is available --- shellrc.d/dev | 9 +++++++++ 1 file changed, 9 insertions(+) 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 -- cgit v1.2.3