Last change
on this file since 14291 was 14221, checked in by tbretz, 12 years ago |
The () didn't work. Replaced by []||[]
|
-
Property svn:executable
set to
*
|
File size:
1.2 KB
|
Line | |
---|
1 | #!/bin/bash --login
|
---|
2 |
|
---|
3 |
|
---|
4 | CMD="$*"
|
---|
5 | PRG="$1"
|
---|
6 |
|
---|
7 | while [ true ]; do
|
---|
8 |
|
---|
9 | reset
|
---|
10 |
|
---|
11 | if [ -n "$RC" ]; then
|
---|
12 | echo LAST RETURN CODE=$RC
|
---|
13 | fi
|
---|
14 |
|
---|
15 | echo COMMAND=$CMD
|
---|
16 | echo
|
---|
17 |
|
---|
18 | if [ ! -x $PRG ]; then
|
---|
19 | echo $1 not available... waiting 5s.
|
---|
20 | sleep 5
|
---|
21 | continue
|
---|
22 | fi
|
---|
23 |
|
---|
24 | if [ -e compiling.lock ]; then
|
---|
25 | echo Compilation in progress... waiting 1s.
|
---|
26 | sleep 1
|
---|
27 | continue
|
---|
28 | fi
|
---|
29 |
|
---|
30 | $CMD
|
---|
31 | RC=$?
|
---|
32 |
|
---|
33 | echo RETURN CODE=$RC
|
---|
34 | echo
|
---|
35 |
|
---|
36 | # HUP 1 exit
|
---|
37 | # INT 2 exit
|
---|
38 | # QUIT 3 core
|
---|
39 | # ILL 4 core
|
---|
40 | # TRAP 5 core
|
---|
41 | # ABRT 6 core
|
---|
42 | # FPE 8 core
|
---|
43 | # KILL 9 exit
|
---|
44 | # SEGV 11 core
|
---|
45 | # PIPE 13 exit
|
---|
46 | # ALRM 14 exit
|
---|
47 | # TERM 15 exit
|
---|
48 |
|
---|
49 | # 0 (User requested exit from the command line)
|
---|
50 | # 1- (Eval options failed, return code of StateMachineImp::Run)
|
---|
51 | # 126 (exit requested from recompile.sh)
|
---|
52 | # 127 (problem with option parsing or no program start, like --help)
|
---|
53 | # 128 (exit(128))
|
---|
54 | # 134 (ABRT, double corruption, abort())
|
---|
55 | # 139 (SEGV, 128+11)
|
---|
56 | # 255 (exception)
|
---|
57 |
|
---|
58 | if [ $RC -eq 126 ]; then
|
---|
59 | continue
|
---|
60 | fi
|
---|
61 |
|
---|
62 | # RC<=128 || RC==KILL || RC=TERM || RC=exception
|
---|
63 | if [ $RC -le 128 ] || [ $RC -eq 137 ] || [ $RC -eq 143 ] || [ $RC -eq 255 ] ]; then
|
---|
64 | exit
|
---|
65 | fi
|
---|
66 |
|
---|
67 | done
|
---|
68 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.