Explorar el Código

Merge pull request #1975 from Bara/patch-1

Update license year
Daniel Gibbs hace 7 años
padre
commit
b99d073d96
Se han modificado 3 ficheros con 10 adiciones y 6 borrados
  1. 1 1
      LICENSE
  2. 7 4
      lgsm/functions/check_deps.sh
  3. 2 1
      lgsm/functions/update_minecraft.sh

+ 1 - 1
LICENSE

@@ -1,6 +1,6 @@
 The MIT License (MIT)
 The MIT License (MIT)
 
 
-Copyright (c) 2017 Daniel Gibbs
+Copyright (c) 2018 Daniel Gibbs
 
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
 of this software and associated documentation files (the "Software"), to deal

+ 7 - 4
lgsm/functions/check_deps.sh

@@ -140,8 +140,11 @@ fn_deps_detector(){
 			echo -e "${red}${deptocheck}${default}"
 			echo -e "${red}${deptocheck}${default}"
 			sleep 0.2
 			sleep 0.2
 		fi
 		fi
-		if [ "${deptocheck}" ==  "glibc.i686" ]||[ "${deptocheck}" ==  "libstdc++64.i686" ]||[ "${deptocheck}" ==  "lib32gcc1" ]||[ "${deptocheck}" ==  "libstdc++6:i386" ]; then
-			steamcmdfail=1
+		# Define required dependencies for SteamCMD
+		if [ -n "${appid}" ]; then
+			if [ "${deptocheck}" ==  "glibc.i686" ]||[ "${deptocheck}" ==  "libstdc++64.i686" ]||[ "${deptocheck}" ==  "lib32gcc1" ]||[ "${deptocheck}" ==  "libstdc++6:i386" ]; then
+				steamcmdfail=1
+			fi
 		fi
 		fi
 	fi
 	fi
 
 
@@ -398,7 +401,7 @@ fn_deps_build_redhat(){
 	fi
 	fi
 
 
 	# All servers except ts3,mumble,multitheftauto and minecraft servers require glibc.i686 and libstdc++.i686
 	# All servers except ts3,mumble,multitheftauto and minecraft servers require glibc.i686 and libstdc++.i686
-	if [ "${shortname}" != "ts3" ]&&[ "${shortname}" != "mumble" ]&&[ "${shortname}" != "nc" ]&&[ "${engine}" != "renderware" ]; then
+	if [ "${shortname}" != "ts3" ]&&[ "${shortname}" != "mumble" ]&&[ "${shortname}" != "mc" ]&&[ "${engine}" != "renderware" ]; then
 		if [[ "${distroname}" == *"Amazon Linux AMI"* ]]; then
 		if [[ "${distroname}" == *"Amazon Linux AMI"* ]]; then
 			array_deps_required+=( glibc.i686 libstdc++64.i686 )
 			array_deps_required+=( glibc.i686 libstdc++64.i686 )
 		else
 		else
@@ -492,4 +495,4 @@ elif [ -f "/etc/redhat-release" ]; then
 	fn_deps_build_redhat
 	fn_deps_build_redhat
 else
 else
 	fn_print_warning_nl "${distroname} dependency checking unavailable"
 	fn_print_warning_nl "${distroname} dependency checking unavailable"
-fi
+fi

+ 2 - 1
lgsm/functions/update_minecraft.sh

@@ -9,7 +9,8 @@ local commandaction="Update"
 local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 
 fn_update_dl(){
 fn_update_dl(){
-	latestmcbuildurl=$(${curlpath} -s $(${curlpath} -s "https://launchermeta.mojang.com/mc/game/version_manifest.json" | jq -r '.versions[0] | .url') |  jq -r '.downloads.server.url')
+	latestmcreleaselink=$(${curlpath} -s "https://launchermeta.mojang.com/mc/game/version_manifest.json" | jq -r '.latest.release as $latest | .versions[] | select(.id == $latest) | .url')
+	latestmcbuildurl=$(${curlpath} -s "${latestmcreleaselink}" | jq -r '.downloads.server.url')
 	fn_fetch_file "${latestmcbuildurl}" "${tmpdir}" "minecraft_server.${availablebuild}.jar"
 	fn_fetch_file "${latestmcbuildurl}" "${tmpdir}" "minecraft_server.${availablebuild}.jar"
 	echo -e "copying to ${serverfiles}...\c"
 	echo -e "copying to ${serverfiles}...\c"
 	fn_script_log "Copying to ${serverfiles}"
 	fn_script_log "Copying to ${serverfiles}"