Browse Source

minor messages tweaks

pull/947/head
Daniel Gibbs 9 years ago
parent
commit
8a47bbfc23
  1. 11
      lgsm/functions/update_ts3.sh

11
lgsm/functions/update_ts3.sh

@ -47,6 +47,7 @@ fn_update_ts3_currentbuild(){
fi fi
fi fi
# Get current build from logs
currentbuild=$(cat $(find ./* -name 'ts3server*_0.log' 2> /dev/null | sort | egrep -E -v '${rootdir}/.ts3version' | tail -1) | egrep -o 'TeamSpeak 3 Server ((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}' | egrep -o '((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}') currentbuild=$(cat $(find ./* -name 'ts3server*_0.log' 2> /dev/null | sort | egrep -E -v '${rootdir}/.ts3version' | tail -1) | egrep -o 'TeamSpeak 3 Server ((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}' | egrep -o '((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}')
if [ -z "${currentbuild}" ]; then if [ -z "${currentbuild}" ]; then
fn_print_error_nl "Checking for update: teamspeak.com: Current build version not found" fn_print_error_nl "Checking for update: teamspeak.com: Current build version not found"
@ -76,14 +77,14 @@ elif [ "${arch}" == "i386" ]||[ "${arch}" == "i686" ]; then
ts3arch="x86" ts3arch="x86"
else else
echo "" echo ""
fn_print_failure "unknown or unsupported architecture: ${arch}" fn_print_failure "Unknown or unsupported architecture: ${arch}"
fn_script_log_fatal "unknown or unsupported architecture: ${arch}" fn_script_log_fatal "Unknown or unsupported architecture: ${arch}"
core_exit.sh core_exit.sh
fi fi
} }
fn_update_ts3_availablebuild(){ fn_update_ts3_availablebuild(){
# Gets availablebuild info. # Gets latest build info.
# Creates tmp dir if missing # Creates tmp dir if missing
if [ ! -d "${lgsmdir}/tmp" ]; then if [ ! -d "${lgsmdir}/tmp" ]; then
@ -133,8 +134,8 @@ fn_update_ts3_compare(){
echo -e "\n" echo -e "\n"
echo -e "Update available:" echo -e "Update available:"
sleep 1 sleep 1
echo -e " Current build: ${red}${currentbuild} ${architecture}${default}" echo -e " Current build: ${red}${currentbuild} ${ts3arch}${default}"
echo -e " Available build: ${green}${availablebuild} ${architecture}${default}" echo -e " Available build: ${green}${availablebuild} ${ts3arch}${default}"
echo -e "" echo -e ""
sleep 1 sleep 1
echo "" echo ""

Loading…
Cancel
Save