gobyexample/tools/build-loop
Hossein Naghdbishi cb2d0d9555
/bin/bash -> /usr/bin/env bash (#471)
Using env offers better portability
2023-04-19 16:25:41 -07:00

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