gobyexample/tools/build-loop
niyumard 76349f8350 /bin/bash -> /usr/bin/env bash
This enables NixOS users to run the scripts in tools folder. I don't
think it will break compatibility with other distros or make any
breaking changes.
2023-04-19 16:55:56 +03:30

22 lines
280 B
Bash
Executable File

#!/usr/bin/env bash
TRAPPING=0
trap "{ echo finishing; TRAPPING=1; }" SIGINT
while :
do
tools/build
RET=$?
if [ $RET -eq 0 ]; then
echo "success"
else
echo "error: $RET"
fi
if [ $TRAPPING -eq 0 ]; then
sleep 1
else
echo "done"
exit 0
fi
done