Просмотр исходного кода

Fixed bug not detecting game

Fixed this bug not detecting certain games. However codes does not
display correctly. Will fix soon. quick fix until then
Daniel Gibbs 11 лет назад
Родитель
Сommit
38d23c4fa5
1 измененных файлов с 21 добавлено и 21 удалено
  1. 21 21
      functions/fn_glibcfix

+ 21 - 21
functions/fn_glibcfix

@@ -2,7 +2,7 @@
 # LGSM fn_glibcfix function
 # Author: Daniel Gibbs
 # Website: http://danielgibbs.co.uk
-# Version: 231114
+# Version: 011214
 
 fn_glibcfixmsg(){
 echo "GLIBC Fix required"
@@ -38,30 +38,13 @@ if [ -z $(command -v ldd) ]; then
 			 * ) echo "Please answer yes or no.";;
 		esac
 	done
-elif [ "$(ldd --version | sed -n '1 p' | tr -cd [:digit:] | tail -c 3)" -lt 213 ]; then
-	glibcversion="2.13"
-	fn_glibcfixmsg
-	# ARMA 3
-	if [ "${gamename}" == "ARMA 3" ]; then
-		cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/libstdc++.so.6"
-	# Just Cause 2
-	elif [ "${gamename}" == "Just Cause 2" ]; then
-		cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/libstdc++.so.6"
-	else
-		echo "error: Unable to detect game. Fix not applied"
-	fi
-	sleep 1
-	echo ""	
-	echo "GLIBC fix has been applied!"
-	sleep 1
-	echo ""		
 elif [ "$(ldd --version | sed -n '1 p' | tr -cd [:digit:] | tail -c 3)" -lt 215 ]; then
 	glibcversion="2.15"
 	fn_glibcfixmsg
 	# Blade Symphony
 	if [ "${gamename}" == "Blade Symphony" ]; then
 		cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/libstdc++.so.6"
-	# Fistful of Frags	
+	# Fistful of Frags
 	elif [ "${gamename}" == "Fistful of Frags" ]; then
 		cd "${filesdir}"
 		wget -nv -N --no-check-certificate https://github.com/dgibbs64/linuxgameservers/raw/master/FistfulOfFrags/dependencies/libm.so.6
@@ -87,12 +70,29 @@ elif [ "$(ldd --version | sed -n '1 p' | tr -cd [:digit:] | tail -c 3)" -lt 215
 	elif [ "${gamename}" == "No More Room in Hell" ]; then
 		cd "${filesdir}"
 		wget -nv -N --no-check-certificate https://github.com/dgibbs64/linuxgameservers/raw/master/NoMoreRoomInHell/dependencies/libm.so.6
-		cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/libstdc++.so.6"	
+		cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/libstdc++.so.6"
+	elif [ "$(ldd --version | sed -n '1 p' | tr -cd [:digit:] | tail -c 3)" -lt 213 ]; then
+		glibcversion="2.13"
+		fn_glibcfixmsg
+		# ARMA 3
+		if [ "${gamename}" == "ARMA 3" ]; then
+			cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/libstdc++.so.6"
+		# Just Cause 2
+		elif [ "${gamename}" == "Just Cause 2" ]; then
+			cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/libstdc++.so.6"
+		else
+			echo "error: Unable to detect game. Fix not applied"
+		fi
+		sleep 1
+		echo ""
+		echo "GLIBC fix has been applied!"
+		sleep 1
+		echo ""
 	else
 		echo "error: Unable to detect game. Fix not applied"
 	fi
 	sleep 1
-	echo ""	
+	echo ""
 	echo "GLIBC fix has been applied!"
 	sleep 1
 	echo ""