Files
mgmt/misc/looper.sh
Karpfen 7e8ced534f misc: Use /usr/bin/env for a more generic shebang
Use path based SHELL in Makefiles. It was suggested that this is a
better solution for make for cases when there is no /usr/bin/env.

See: https://github.com/purpleidea/mgmt/pull/694#discussion_r1015596204
2025-03-22 14:53:21 -04:00

15 lines
239 B
Bash
Executable File

#!/usr/bin/env bash
# simple test loop runner, eg: ./looper.sh make test-shell-exec-fail
while true
do
echo "running: $@"
$@ # run some command
ret=$?
if [ $ret -ne 0 ]; then
echo "failed with code: $ret"
exit $ret
fi
echo
done