logo

utils-std

Collection of commonly available Unix tools git clone https://anongit.hacktivis.me/git/utils-std.git
commit: b1bc1ccb2f435f3b054f0bcfb0552b49b5f2ac8d
parent a78707a6c9153feb52dc7b63728a2bd46b67536e
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Wed, 18 Sep 2024 04:11:46 +0200

check-funcs: Check for remaining jobs

Diffstat:

Mcheck-funcs.sh9+++++++++
1 file changed, 9 insertions(+), 0 deletions(-)

diff --git a/check-funcs.sh b/check-funcs.sh @@ -29,6 +29,15 @@ wrap_test() { err=1 fi + remains="$(jobs -l)" + if [ "${remains}" != "" ]; then + printf '## %s: ' 'Some processes remaining' + echo "$remains" | tr '\n' ';' + printf '\n## %s\n' 'Waiting for them to exit' + wait + echo "## Done" + fi + if [ -n "$tmpdir" ] then cd "$WD"