hcl/t/run.sh

12 lines
390 B
Bash
Raw Permalink Normal View History

2022-02-21 15:22:22 +00:00
#!/bin/sh
## use a subshell to execute the actual program in case the
## program crashes or exits without an error message.
2024-03-09 05:16:51 +00:00
echo RUN "[$@]"
($@ 2>&1 || echo "ERROR: exited with $?") | grep -E '^ERROR:' && exit 1
##[ "x$MEMCHECK" = "xyes" ] && {
## [ -x /usr/bin/valgrind ] && {
## valgrind --leak-check=full --show-reachable=yes --track-fds=yes --log-file=/tmp/x "$@" 2>&1
## }
##}
2022-02-21 15:22:22 +00:00
exit 0