@ -4,7 +4,7 @@
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
version="200116"
version="260116"
# File fetching settings
# Github Branch Select
@ -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
else
@ -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(){
@ -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}"