Browse Source

newer version

pull/521/head
Daniel Gibbs 10 years ago
parent
commit
5d32379052
  1. 10
      functions/fn_update_check

10
functions/fn_update_check

@ -2,11 +2,7 @@
# LGSM fn_update_check function
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
<<<<<<< HEAD
# Version: 281015
=======
# Version: 311015
>>>>>>> refs/remotes/origin/master
# Description: Checks if a server update is available.
@ -223,7 +219,7 @@ ts3arch=$(ls $(find ${filesdir}/ -name 'ts3server_*_*' 2> /dev/null | grep -v 't
wget "http://dl.4players.de/ts/releases/?C=M;O=D" -q -O -| grep -i dir | egrep -o '<a href=\".*\/\">.*\/<\/a>' | egrep -o '[0-9\.?]+'|uniq > .ts3_version_numbers_unsorted.tmp
# removes digits to allow sorting of numbers
cat .ts3_version_numbers_unsorted.tmp |tr -cd "[:digit:][*\n]" > .ts3_version_numbers_digit.tmp
cat .ts3_version_numbers_unsorted.tmp |tr -cd '[:digit:][*\n]' > .ts3_version_numbers_digit.tmp
# Sorts numbers in to correct order
# merges two files in to one with two columns sorts the numbers in to order then only outputs the second to the ts3_version_numbers.tmp
paste .ts3_version_numbers_digit.tmp .ts3_version_numbers_unsorted.tmp |sort -rn|awk '{ print $2 }' > .ts3_version_numbers.tmp
@ -257,8 +253,8 @@ else
fi
# Removes dots so if can compare version numbers
currentbuilddigit=$(echo "${currentbuild}"|tr -cd "[:digit:]")
availablebuilddigit=$(echo "${availablebuild}"|tr -cd "[:digit:]")
currentbuilddigit=$(echo "${currentbuild}"|tr -cd '[:digit:]')
availablebuilddigit=$(echo "${availablebuild}"|tr -cd '[:digit:]')
if [ "${currentbuilddigit}" -ne "${availablebuilddigit}" ]; then
echo -e "\n"
echo -e "Update available:"

Loading…
Cancel
Save