Permalink
Please sign in to comment.
Showing
with
16 additions
and 7 deletions.
- +4 −4 examples/goroutines/goroutines.go
- +12 −3 tools/build-loop
8
examples/goroutines/goroutines.go
15
tools/build-loop
| @@ -1,12 +1,21 @@ | ||
| #!/bin/bash | ||
| +TRAPPING=0 | ||
| +trap "{ echo finishing; TRAPPING=1; }" SIGINT | ||
| + | ||
| while : | ||
| do | ||
| tools/build | ||
| - if [ "$?" == "0" ]; then | ||
| + RET=$? | ||
| + if [ $RET -eq 0 ]; then | ||
| echo "success" | ||
| else | ||
| - echo "error" | ||
| + echo "error: $RET" | ||
| + fi | ||
| + if [ $TRAPPING -eq 0 ]; then | ||
| + sleep 1 | ||
| + else | ||
| + echo "done" | ||
| + exit 0 | ||
| fi | ||
| - sleep 1 | ||
| done |
0 comments on commit
deafc3a