| 1 | #! /bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | |
| 3 | frog -V |
| 4 | |
| 5 | if [scip-shell system . . `[`. $? -ne 0 ] |
| 6 | then |
| 7 | echoscip-shell system . . echo. "unable to execute frog. Is it installed?" |
| 8 | exit 1 |
| 9 | fi |
| 10 | |
| 11 | set `frog -V` |
| 12 | |
| 13 | confdir=$2 |
| 14 | |
| 15 | if ! testscip-shell system . . test. -d $confdir |
| 16 | then |
| 17 | echoscip-shell system . . echo. "frog didn't return a valid config dir. Maybe an old version?" |
| 18 | exit 1 |
| 19 | fi |
| 20 | |
| 21 | cd $confdir |
| 22 | echoscip-shell system . . echo. "entered frog config dir: " $confdir |
| 23 | |
| 24 | if testscip-shell system . . test. -e frog.cfg |
| 25 | then |
| 26 | last=`lsscip-shell system . . ls. frog.cfg.* |sortscip-shell system . . sort. -V | tailscip-shell system . . tail. -1 ` |
| 27 | if [scip-shell system . . `[`. "$last" = "" ] |
| 28 | then |
| 29 | cpscip-shell system . . cp. frog.cfg frog.cfg.1 |
| 30 | echoscip-shell system . . echo. "created a backup copy of 'frog.cfg' :: 'frog.cfg.1'" |
| 31 | else |
| 32 | # echo found $last |
| 33 | new=frog.cfg.`echoscip-shell system . . echo. $last | awkscip-shell system . . awk. -F \. {'print ++$3'}` |
| 34 | cpscip-shell system . . cp. frog.cfg $new |
| 35 | echoscip-shell system . . echo. "created a backup copy of 'frog.cfg' :: '$new'" |
| 36 | fi |
| 37 | fi |
| 38 | |
| 39 | echoscip-shell system . . echo. "attempt to retrieve frog datafiles from http://ilk.uvt.nl/frog" |
| 40 | |
| 41 | \rm -f Frog*.gz |
| 42 | |
| 43 | wget http://ilk.uvt.nl/frog/Frog.mbdp-latest.tar.gz |
| 44 | |
| 45 | if [scip-shell system . . `[`. $? -ne 0 ] |
| 46 | then |
| 47 | echoscip-shell system . . echo. "unable to retrieve frog data, please inform us:" |
| 48 | echoscip-shell system . . echo. "send an e-mail to [email protected]" |
| 49 | exit 1 |
| 50 | fi |
| 51 | |
| 52 | echoscip-shell system . . echo. "unpacking: Frog.mbdp-latest.tar.gz" |
| 53 | tarscip-shell system . . tar. zxf Frog.mbdp-latest.tar.gz |
| 54 | if [scip-shell system . . `[`. $? -ne 0 ] |
| 55 | then |
| 56 | echoscip-shell system . . echo. "unable to unpack frog data, do you have enough rights?" |
| 57 | exit 1 |
| 58 | fi |
| 59 | |
| 60 | echoscip-shell system . . echo. "done" |
| 61 |