Преглед изворни кода

as per https://github.com/koalaman/shellcheck/wiki/SC2060

Daniel Gibbs пре 10 година
родитељ
комит
1c84eff59e
3 измењених фајлова са 5 додато и 5 уклоњено
  1. 1 1
      functions/fn_details
  2. 1 1
      functions/fn_details_config
  3. 3 3
      functions/fn_install_glibcfix

+ 1 - 1
functions/fn_details

@@ -144,7 +144,7 @@ printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
 
 	# GLIBC required
 	if [ -n "${glibcrequired}" ]; 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 [ "$(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)"
 			else

+ 1 - 1
functions/fn_details_config

@@ -8,7 +8,7 @@
 
 ## Examples of filtering to get info from config files
 # sed 's/foo//g' - remove foo
-# tr -cd [:digit:] leave only digits
+# tr -cd '[:digit:]' leave only digits
 # tr -d '=\"; ' remove selected charectors =\";
 # grep -v "foo" filter out lines that contain foo
 

+ 3 - 3
functions/fn_install_glibcfix

@@ -2,7 +2,7 @@
 # LGSM fn_install_glibcfix function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-# Version: 050715
+# Version: 301015
 
 fn_glibcfixmsg(){
 echo ""
@@ -48,7 +48,7 @@ if [ -z $(command -v ldd) ]; then
 		esac
 	done
 # if Glibc less than 1.15
-elif [ "$(ldd --version | sed -n '1 p' | tr -cd [:digit:] | tail -c 3)" -lt 215 ]; then
+elif [ "$(ldd --version | sed -n '1 p' | tr -cd '[:digit:]' | tail -c 3)" -lt 215 ]; then
 	# Blade Symphony
 	if [ "${gamename}" == "Blade Symphony" ]; then
 		glibcversion="2.15"
@@ -110,7 +110,7 @@ elif [ "$(ldd --version | sed -n '1 p' | tr -cd [:digit:] | tail -c 3)" -lt 215
 		wget -nv -N https://github.com/dgibbs64/linuxgsm/raw/master/NoMoreRoomInHell/dependencies/libm.so.6
 		cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/libstdc++.so.6"
 	# if Glibc less than 1.13
-	elif [ "$(ldd --version | sed -n '1 p' | tr -cd [:digit:] | tail -c 3)" -lt 213 ]; then
+	elif [ "$(ldd --version | sed -n '1 p' | tr -cd '[:digit:]' | tail -c 3)" -lt 213 ]; then
 		# ARMA 3
 		if [ "${gamename}" == "ARMA 3" ]; then
 			glibcversion="2.13"