]>
Commit | Line | Data |
---|---|---|
cd1a2927 MT |
1 | #!/bin/bash |
2 | ||
3 | UPGRADEVERSION="1.4.x" # configured by ./make.sh newupdate | |
4 | PREVIOUSVERSION="1.4."$((`echo $UPGRADEVERSION | /usr/bin/cut -f3 -d '.'`-1)) | |
5 | echo "This is the $UPGRADEVERSION update patch for IPCop $PREVIOUSVERSION installing." | |
6 | ||
7 | CURRENTVERSION=`perl -e "require '/var/ipcop/general-functions.pl';print \\$General::version;"` | |
8 | if [ "$CURRENTVERSION" != "$PREVIOUSVERSION" ]; then | |
9 | echo "You are not running IPCop v$PREVIOUSVERSION for this patch to install." | |
10 | echo "Aborting installation." | |
11 | exit -1 | |
12 | fi | |
13 | ||
14 | # general-functions might not be overwrited by patch... | |
15 | /bin/sed -i -e "s+= '1.4.*$+= '$UPGRADEVERSION';+" /var/ipcop/general-functions.pl | |
16 | ||
17 | /bin/tar -zxpf patch.tar.gz -C / | |
18 | ||
19 | #build cachelang file after all "lang/*.pl" updates | |
20 | perl -e "require '/var/ipcop/lang.pl'; &Lang::BuildCacheLang" | |
21 | ||
22 | killall mingetty #redisplay correct version | |
23 | echo "end of $UPGRADEVERSION update" |