Updates nur für Hauptversion

This commit is contained in:
Patrick Schindelmann 2019-09-28 20:28:12 +02:00
parent 2821b70150
commit bce80fa2d0

View File

@ -23,6 +23,7 @@ else
exit 1 exit 1
fi fi
#Debugging-Schalter
#Versionspruefung #Versionspruefung
#echo version_full: $version_full #echo version_full: $version_full
@ -37,17 +38,19 @@ then
fi fi
#echo nachbearbeitet version_full: $version_full #echo nachbearbeitet version_full: $version_full
version_short=$(echo $version_full | cut -d "." -f1-2)
#Debugging-Schalter #Debugging-Schalter
#version_short=$(echo $version_full | cut -d "." -f1-2)
#echo version_short: $version_short #echo version_short: $version_short
version_website=$(lynx -dump https://download.nextcloud.com/server/releases/ | grep "tar.bz2.sha512" | grep "]" | tail -n 1 | cut -d "]" -f 3 |awk '{print $1}' | cut -d "-" -f 2 | cut -d "." -f 1-3) version_website=$(lynx -dump https://download.nextcloud.com/server/releases/ | grep "tar.bz2.sha512" | grep "]" | grep -- "-$version_short" | tail -n 1 | cut -d "]" -f 3 |awk '{print $1}' | cut -d "-" -f 2 | cut -d "." -f 1-3)
#Debugging-Schalter
#echo version_website: $version_website #echo version_website: $version_website
if [ "$version_full" = "$version_website" ] if [ "$version_full" = "$version_website" ]
then then
echo "nextcloud ist up-to-date - installed version: $version_full; newest version: $version_website" echo "nextcloud ist up-to-date - installed version: $version_full; newest version: $version_website"
exit 0 exit 0
#Debugging-Schalter
#elif [ $version_full -lt $version_website ] #elif [ $version_full -lt $version_website ]
# echo Version ist kleiner # echo Version ist kleiner
else else