Line | |
---|
1 | #!/bin/bash |
---|
2 | # |
---|
3 | # called from arb after startup. |
---|
4 | # tests if perl code works. |
---|
5 | # if not -> signal problem via arb_message. |
---|
6 | |
---|
7 | show_error() { |
---|
8 | local TEXT=$* |
---|
9 | arb_message "${TEXT}" |
---|
10 | false |
---|
11 | } |
---|
12 | |
---|
13 | something_wrong_with_perl() { |
---|
14 | show_error "Incompatibility detected between installed arb build and perl version:\n" \ |
---|
15 | "* arb macro playback will not work and\n" \ |
---|
16 | "* other arb perl scripts wont work either." |
---|
17 | } |
---|
18 | |
---|
19 | main() { |
---|
20 | if [ -d "${ARBHOME}" ]; then |
---|
21 | # -> ../PERL_SCRIPTS/ARBTOOLS/TESTS/automatic.pl |
---|
22 | local TESTSCRIPT=${ARBHOME}/PERL_SCRIPTS/ARBTOOLS/TESTS/automatic.pl |
---|
23 | if [ -x ${TESTSCRIPT} ]; then |
---|
24 | local TESTCALL="${TESTSCRIPT} -db ${ARBHOME}/demo.arb -client arb" |
---|
25 | ${TESTCALL} || something_wrong_with_perl |
---|
26 | else |
---|
27 | show_error "not executable: '${TESTSCRIPT}'" |
---|
28 | fi |
---|
29 | else |
---|
30 | echo "incorrect value: \$ARBHOME (='${ARBHOME}')" |
---|
31 | false |
---|
32 | fi |
---|
33 | } |
---|
34 | |
---|
35 | main |
---|
Note: See
TracBrowser
for help on using the repository browser.