diff --git a/functions/command_details.sh b/functions/command_details.sh index 396cf487c..a37024a3b 100644 --- a/functions/command_details.sh +++ b/functions/command_details.sh @@ -145,7 +145,7 @@ printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = echo -e "\e[34mUser:\t\e[0m$(whoami)" # GLIBC required - if [ -n "${glibcrequired}" ]; then + if [ -n "${glibcrequired}" ] && [ "${glibcrequired}" != "UNKNOWN" ]; then if [ "$(ldd --version | sed -n '1 p' | tr -cd '[:digit:]' | tail -c 3)" -lt "$(echo "${glibcrequired}" | sed -n '1 p' | tr -cd '[:digit:]' | tail -c 3)" ]; then if [ "${glibcfix}" == "yes" ]; then echo -e "\e[34mGLIBC required:\t\e[0;31m${glibcrequired} \e[0m(\e[0;32mUsing GLIBC fix\e[0m)" diff --git a/functions/install_ts3.sh b/functions/install_ts3.sh index 27598ac56..71d27eec3 100644 --- a/functions/install_ts3.sh +++ b/functions/install_ts3.sh @@ -18,11 +18,8 @@ fi # Grabs all version numbers but not in correct order wget "http://dl.4players.de/ts/releases/?C=M;O=D" -q -O -| grep -i dir | egrep -o '.*\/<\/a>' | egrep -o '[0-9\.?]+'|uniq > .ts3_version_numbers_unsorted.tmp -# Replaces dots with spaces to split up the number. e.g 3 0 12 1 is 3.0.12.1 this allows correct sorting - cat .ts3_version_numbers_unsorted.tmp | tr "." " " > .ts3_version_numbers_digit.tmp -# Sorts versions in to correct order -# merges 2 files and orders by each column in order allowing these version numbers to be sorted in order -paste .ts3_version_numbers_digit.tmp .ts3_version_numbers_unsorted.tmp | awk '{print $1,$2,$3,$4 " " $0;}'| sort -k1rn -k2rn -k3rn -k4rn | awk '{print $NF}' > .ts3_version_numbers.tmp +# Sort version numbers +cat .ts3_version_numbers_unsorted.tmp | sort -r --version-sort -o .ts3_version_numbers_sorted.tmp # Finds directory with most recent server version. while read ts3_version_number; do @@ -32,18 +29,19 @@ while read ts3_version_number; do # Break while-loop, if the latest release could be found break fi -done < .ts3_version_numbers.tmp +done < .ts3_version_numbers_sorted.tmp -# tidy up -rm -f ".ts3_version_numbers_digit.tmp" +# Tidy up rm -f ".ts3_version_numbers_unsorted.tmp" -rm -f ".ts3_version_numbers.tmp" +rm -f ".ts3_version_numbers_sorted.tmp" # Checks availablebuild info is available if [ -z "${availablebuild}" ]; then fn_printfail "Checking for update: teamspeak.com" + fn_scriptlog "Checking for update: teamspeak.com" sleep 1 fn_printfail "Checking for update: teamspeak.com: Not returning version info" + fn_scriptlog "Failure! Checking for update: teamspeak.com: Not returning version info" sleep 2 exit 1 fi