diff --git a/_MasterScript/lgsm-core b/_MasterScript/lgsm-core index 783905e1d..c7d29619a 100755 --- a/_MasterScript/lgsm-core +++ b/_MasterScript/lgsm-core @@ -4,7 +4,7 @@ # Author: Daniel Gibbs # Website: http://gameservermanagers.com -version="200116" +version="260116" # File fetching settings # Github Branch Select diff --git a/functions/fix.sh b/functions/fix.sh index 1f22b5a06..e44740677 100644 --- a/functions/fix.sh +++ b/functions/fix.sh @@ -9,12 +9,6 @@ lgsm_version="260116" # Fixes that are run on start if [ "${function_selfname}" != "command_install.sh" ]; then - echo "" - echo "Applying ${gamename} Server Fixes" - echo "=================================" - sleep 1 - fn_fix_game_dependencies - fix_glibc.sh if [ ! -z "${appid}" ]; then fix_steamcmd.sh fi @@ -36,4 +30,11 @@ if [ "${function_selfname}" != "command_install.sh" ]; then elif [ "${gamename}" == "Unreal Tournament 99" ]; then fix_ut99.sh fi +else + echo "" + echo "Applying ${gamename} Server Fixes" + echo "=================================" + sleep 1 + fn_fix_game_dependencies + fix_glibc.sh fi diff --git a/gamedata/_parms_plusminus b/gamedata/_parms_plusminus index 8e1766887..bde4c8040 100644 --- a/gamedata/_parms_plusminus +++ b/gamedata/_parms_plusminus @@ -2,11 +2,20 @@ # _parms_plusminus # Parameter parsing with "+" and "-" sorting +apply_shell_expansion() { + declare file="$1" + declare data=$(< "$file") + declare delimiter="__apply_shell_expansion_delimiter__" + declare command="cat <<$delimiter"$'\n'"$data"$'\n'"$delimiter" + eval "$command" +} + # Process parameter list fn_process_parmlist(){ prefix=$1 file=$2 - echo $(grep -v '=""$' "${file}" | sed -e "s/^\([^#=]\+\)=\"/${prefix}\1 /g" -e 's/\"$//g') + # Expand variables, remove empties, strip = and " and prefix argument + echo $(printf "%s\n" "$(apply_shell_expansion "${file}")" | grep -v '=""' | sed -e "s/^\([^#=]\+\)=\"/${prefix}\1 /g" -e 's/\"$//g') } # This is the way we create a script that collates and parses the parameters fn_parms(){ diff --git a/gamedata/insserver b/gamedata/insserver index 35d23e32a..d0edd0198 100644 --- a/gamedata/insserver +++ b/gamedata/insserver @@ -26,7 +26,8 @@ fn_set_game_params params_plus "mapcyclefile" "\${mapcyclefile}" fn_set_game_params settings "mapcyclefile" "mapcycle_cooperative.txt" "Mapcycle File" # Workshop -fn_set_game_params parms_plus "sv_workshop_enabled" "--EMPTY--" "Comma-delimited list of workshop items to subscribe to" +fn_set_game_params settings "sv_workshop_enabled" "--EMPTY--" "Comma-delimited list of workshop items to subscribe to" +fn_set_game_params parms_plus "sv_workshop_enabled" "\${sv_workshop_enabled}" # Beta fn_set_game_params parms_minus "beta" "\${beta}"