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