Browse Source

Log entry for Metamod addition in gameinfo.gi

pull/4929/head
xe1os 2 weeks ago
committed by GitHub
parent
commit
1383d79f5d
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 15
      lgsm/modules/mods_core.sh

15
lgsm/modules/mods_core.sh

@ -753,14 +753,23 @@ fn_mod_remove_amxmodx_file() {
fn_mod_install_gameinfo_gi_file() { fn_mod_install_gameinfo_gi_file() {
if [ -f "${modinstalldir}/gameinfo.gi" ]; then if [ -f "${modinstalldir}/gameinfo.gi" ]; then
# modify the liblist.gam file to initialize Metamod logentry="line (Game csgo/addons/metamod) added to ${modinstalldir}/gameinfo.gi"
echo -en "modifying gameinfo.gi..." echo -en "modifying gameinfo.gi..."
fn_sleep_time
if grep -Eq "^[[:space:]]*Game[[:space:]]+csgo/addons/metamod" "${modinstalldir}/gameinfo.gi"; then
fn_script_log_info "Metamod Source 2 gameinfo.gi entry already exists"
fn_print_ok_eol_nl
return
fi
sed -i "/Game_LowViolence/a \ \ \ \ \ \ \ \ \ \ \ Game\ \ \ \ csgo/addons/metamod" "${modinstalldir}/gameinfo.gi" sed -i "/Game_LowViolence/a \ \ \ \ \ \ \ \ \ \ \ Game\ \ \ \ csgo/addons/metamod" "${modinstalldir}/gameinfo.gi"
exitcode=$? exitcode=$?
# if replacement back didn't happen, error out.
if [ "${exitcode}" != 0 ]; then if [ "${exitcode}" -ne 0 ]; then
fn_script_log_fail "${logentry}" fn_script_log_fail "${logentry}"
fn_print_fail_eol_nl fn_print_fail_eol_nl
core_exit.sh
else else
fn_script_log_pass "${logentry}" fn_script_log_pass "${logentry}"
fn_print_ok_eol_nl fn_print_ok_eol_nl

Loading…
Cancel
Save