|
Last change
on this file was
19491,
checked in by westram, 2 years ago
|
- after detecting perl/macro-incompatibility, show OS-specific advice.
|
-
Property svn:executable set to
*
|
|
File size:
1.4 KB
|
| 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 | if [[ "$OSTYPE" == "darwin"* ]]; then |
|---|
| 15 | show_error "This problem may have been caused by an update of the installed perl version.\n" \ |
|---|
| 16 | "Re-installing arb may fix this problem." |
|---|
| 17 | else |
|---|
| 18 | show_error "To fix arb/perl compatibility you may\n" \ |
|---|
| 19 | "* install a pre-built version that uses your perl version or\n" \ |
|---|
| 20 | "* build arb yourself from source\n" \ |
|---|
| 21 | " see http://bugs.arb-home.de/wiki/building-arb-from-svn" |
|---|
| 22 | fi |
|---|
| 23 | |
|---|
| 24 | show_error "Incompatibility detected between installed arb build and perl version:\n" \ |
|---|
| 25 | "* arb macro playback will not work and\n" \ |
|---|
| 26 | "* other arb perl scripts wont work either." |
|---|
| 27 | } |
|---|
| 28 | |
|---|
| 29 | main() { |
|---|
| 30 | if [ -d "${ARBHOME}" ]; then |
|---|
| 31 | # -> ../PERL_SCRIPTS/ARBTOOLS/TESTS/automatic.pl |
|---|
| 32 | local TESTSCRIPT=${ARBHOME}/PERL_SCRIPTS/ARBTOOLS/TESTS/automatic.pl |
|---|
| 33 | if [ -x ${TESTSCRIPT} ]; then |
|---|
| 34 | local TESTCALL="${TESTSCRIPT} -db ${ARBHOME}/demo.arb -client arb" |
|---|
| 35 | ${TESTCALL} || something_wrong_with_perl |
|---|
| 36 | else |
|---|
| 37 | show_error "not executable: '${TESTSCRIPT}'" |
|---|
| 38 | fi |
|---|
| 39 | else |
|---|
| 40 | echo "incorrect value: \$ARBHOME (='${ARBHOME}')" |
|---|
| 41 | false |
|---|
| 42 | fi |
|---|
| 43 | } |
|---|
| 44 | |
|---|
| 45 | main |
|---|
Note: See
TracBrowser
for help on using the repository browser.