36 lines
710 B
Plaintext
36 lines
710 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
version_website=$(lynx -dump https://www.dokuwiki.org/changes 2> /dev/null | grep ^Release | head -n 1 | cut -d " " -f 2)
|
||
|
if [ $# = 0 ]
|
||
|
then
|
||
|
dokuwiki_root="/var/www/"
|
||
|
else
|
||
|
dokuwiki_root=$1
|
||
|
fi
|
||
|
|
||
|
/usr/bin/which lynx > /dev/null 2>&1
|
||
|
if [ ! $? = 0 ]
|
||
|
then
|
||
|
echo "lynx ist nicht installiert"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
installed_version=$(cut -d " " -f 1 "$dokuwiki_root"/VERSION)
|
||
|
|
||
|
|
||
|
#Versionspruefung
|
||
|
|
||
|
|
||
|
|
||
|
if [ "$installed_version" = "$version_website" ]
|
||
|
then
|
||
|
echo "DokuWiki ist up-to-date - installed version: $installed_version; newest version: $version_website"
|
||
|
exit 0
|
||
|
else
|
||
|
#Warnung wird ausgegeben
|
||
|
echo "different version - installed version: $installed_version; newest version: $version_website"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
|