|
|
@ -22,7 +22,7 @@ fn_mod_install_files() { |
|
|
|
# Check if variable is valid checking if file has been downloaded and exists. |
|
|
|
if [ ! -f "${modstmpdir}/${modfilename}" ]; then |
|
|
|
fn_print_failure "An issue occurred downloading ${modprettyname}" |
|
|
|
fn_script_log_fatal "An issue occurred downloading ${modprettyname}" |
|
|
|
fn_script_log_fail "An issue occurred downloading ${modprettyname}" |
|
|
|
core_exit.sh |
|
|
|
fi |
|
|
|
if [ ! -d "${extractdest}" ]; then |
|
|
@ -77,7 +77,7 @@ fn_mod_create_filelist() { |
|
|
|
local exitcode=$? |
|
|
|
if [ "${exitcode}" != 0 ]; then |
|
|
|
fn_print_fail_eol_nl |
|
|
|
fn_script_log_fatal "Building ${modsdir}/${modcommand}-files.txt" |
|
|
|
fn_script_log_fail "Building ${modsdir}/${modcommand}-files.txt" |
|
|
|
core_exit.sh |
|
|
|
else |
|
|
|
fn_print_ok_eol_nl |
|
|
@ -97,7 +97,7 @@ fn_mod_copy_destination() { |
|
|
|
local exitcode=$? |
|
|
|
if [ "${exitcode}" != 0 ]; then |
|
|
|
fn_print_fail_eol_nl |
|
|
|
fn_script_log_fatal "Copying ${modprettyname} to ${modinstalldir}" |
|
|
|
fn_script_log_fail "Copying ${modprettyname} to ${modinstalldir}" |
|
|
|
else |
|
|
|
fn_print_ok_eol_nl |
|
|
|
fn_script_log_pass "Copying ${modprettyname} to ${modinstalldir}" |
|
|
@ -135,7 +135,7 @@ fn_mod_tidy_files_list() { |
|
|
|
local exitcode=$? |
|
|
|
if [ "${exitcode}" != 0 ]; then |
|
|
|
fn_print_fail_eol_nl |
|
|
|
fn_script_log_fatal "Error while tidying line: ${removefilevar} from: ${modsdir}/${modcommand}-files.txt" |
|
|
|
fn_script_log_fail "Error while tidying line: ${removefilevar} from: ${modsdir}/${modcommand}-files.txt" |
|
|
|
core_exit.sh |
|
|
|
break |
|
|
|
fi |
|
|
@ -228,7 +228,7 @@ fn_mod_get_info() { |
|
|
|
# Define all variables for a mod at once when index is set to a separator. |
|
|
|
fn_mods_define() { |
|
|
|
if [ -z "$index" ]; then |
|
|
|
fn_script_log_fatal "index variable not set. Please report an issue." |
|
|
|
fn_script_log_fail "index variable not set. Please report an issue." |
|
|
|
fn_print_error "index variable not set. Please report an issue." |
|
|
|
echo -e "* https://github.com/GameServerManagers/LinuxGSM/issues" |
|
|
|
core_exit.sh |
|
|
@ -390,7 +390,7 @@ fn_create_mods_dir() { |
|
|
|
exitcode=$? |
|
|
|
if [ "${exitcode}" != 0 ]; then |
|
|
|
fn_print_fail_eol_nl |
|
|
|
fn_script_log_fatal "Creating mod download dir ${modsdir}" |
|
|
|
fn_script_log_fail "Creating mod download dir ${modsdir}" |
|
|
|
core_exit.sh |
|
|
|
else |
|
|
|
fn_print_ok_eol_nl |
|
|
@ -404,7 +404,7 @@ fn_create_mods_dir() { |
|
|
|
exitcode=$? |
|
|
|
if [ "${exitcode}" != 0 ]; then |
|
|
|
fn_print_fail_eol_nl |
|
|
|
fn_script_log_fatal "Creating mod install directory ${modinstalldir}" |
|
|
|
fn_script_log_fail "Creating mod install directory ${modinstalldir}" |
|
|
|
core_exit.sh |
|
|
|
else |
|
|
|
fn_print_ok_eol_nl |
|
|
@ -427,7 +427,7 @@ fn_mods_create_tmp_dir() { |
|
|
|
echo -en "creating mod download directory ${modstmpdir}..." |
|
|
|
if [ "${exitcode}" != 0 ]; then |
|
|
|
fn_print_fail_eol_nl |
|
|
|
fn_script_log_fatal "Creating mod download directory ${modstmpdir}" |
|
|
|
fn_script_log_fail "Creating mod download directory ${modstmpdir}" |
|
|
|
core_exit.sh |
|
|
|
else |
|
|
|
fn_print_ok_eol_nl |
|
|
@ -444,7 +444,7 @@ fn_mods_clear_tmp_dir() { |
|
|
|
exitcode=$? |
|
|
|
if [ "${exitcode}" != 0 ]; then |
|
|
|
fn_print_fail_eol_nl |
|
|
|
fn_script_log_fatal "Clearing mod download directory ${modstmpdir}" |
|
|
|
fn_script_log_fail "Clearing mod download directory ${modstmpdir}" |
|
|
|
core_exit.sh |
|
|
|
else |
|
|
|
fn_print_ok_eol_nl |
|
|
@ -491,12 +491,12 @@ fn_check_mod_files_list() { |
|
|
|
if [ "${modsfilelistsize}" -eq 0 ]; then |
|
|
|
fn_print_failure "${modcommand}-files.txt is empty" |
|
|
|
echo -e "* Unable to remove ${modprettyname}" |
|
|
|
fn_script_log_fatal "${modcommand}-files.txt is empty: Unable to remove ${modprettyname}." |
|
|
|
fn_script_log_fail "${modcommand}-files.txt is empty: Unable to remove ${modprettyname}." |
|
|
|
core_exit.sh |
|
|
|
fi |
|
|
|
else |
|
|
|
fn_print_failure "${modsdir}/${modcommand}-files.txt does not exist" |
|
|
|
fn_script_log_fatal "${modsdir}/${modcommand}-files.txt does not exist: Unable to remove ${modprettyname}." |
|
|
|
fn_script_log_fail "${modsdir}/${modcommand}-files.txt does not exist: Unable to remove ${modprettyname}." |
|
|
|
core_exit.sh |
|
|
|
fi |
|
|
|
} |
|
|
@ -519,7 +519,7 @@ fn_mod_exist() { |
|
|
|
fn_mod_required_fail_exist() { |
|
|
|
modreq=$1 |
|
|
|
# requires one parameter, the mod |
|
|
|
fn_script_log_fatal "${modreq}-files.txt is empty: unable to find ${modreq} installed" |
|
|
|
fn_script_log_fail "${modreq}-files.txt is empty: unable to find ${modreq} installed" |
|
|
|
echo -en "* Unable to find '${modreq}' which is required prior to installing this mod..." |
|
|
|
fn_print_fail_eol_nl |
|
|
|
core_exit.sh |
|
|
@ -581,7 +581,7 @@ fn_mod_install_liblist_gam_file() { |
|
|
|
exitcode=$? |
|
|
|
# if replacement back didn't happen, error out. |
|
|
|
if [ "${exitcode}" != 0 ]; then |
|
|
|
fn_script_log_fatal "${logentry}" |
|
|
|
fn_script_log_fail "${logentry}" |
|
|
|
fn_print_fail_eol_nl |
|
|
|
else |
|
|
|
fn_script_log_pass "${logentry}" |
|
|
@ -597,7 +597,7 @@ fn_mod_install_liblist_gam_file() { |
|
|
|
exitcode=$? |
|
|
|
# if replacement back didn't happen, error out |
|
|
|
if [ "${exitcode}" != 0 ]; then |
|
|
|
fn_script_log_fatal "${logentry}" |
|
|
|
fn_script_log_fail "${logentry}" |
|
|
|
fn_print_fail_eol_nl |
|
|
|
else |
|
|
|
fn_script_log_pass "${logentry}" |
|
|
@ -615,7 +615,7 @@ fn_mod_install_liblist_gam_file() { |
|
|
|
exitcode=$? |
|
|
|
# if replacement back didn't happen, error out. |
|
|
|
if [ "${exitcode}" != 0 ]; then |
|
|
|
fn_script_log_fatal "${logentry}" |
|
|
|
fn_script_log_fail "${logentry}" |
|
|
|
fn_print_fail_eol_nl |
|
|
|
else |
|
|
|
fn_script_log_pass ${logentry} |
|
|
@ -639,7 +639,7 @@ fn_mod_remove_liblist_gam_file() { |
|
|
|
exitcode=$? |
|
|
|
# if replacement back didn't happen, error out. |
|
|
|
if [ "${exitcode}" != 0 ]; then |
|
|
|
fn_script_log_fatal "${logentry}" |
|
|
|
fn_script_log_fail "${logentry}" |
|
|
|
fn_print_fail_eol_nl |
|
|
|
else |
|
|
|
fn_script_log_pass ${logentry} |
|
|
@ -655,7 +655,7 @@ fn_mod_remove_liblist_gam_file() { |
|
|
|
exitcode=$? |
|
|
|
# if replacement back didn't happen, error out |
|
|
|
if [ "${exitcode}" != 0 ]; then |
|
|
|
fn_script_log_fatal "${logentry}" |
|
|
|
fn_script_log_fail "${logentry}" |
|
|
|
fn_print_fail_eol_nl |
|
|
|
else |
|
|
|
fn_script_log_pass ${logentry} |
|
|
@ -673,7 +673,7 @@ fn_mod_remove_liblist_gam_file() { |
|
|
|
# if replacement back didn't happen, error out. |
|
|
|
exitcode=$? |
|
|
|
if [ "${exitcode}" != 0 ]; then |
|
|
|
fn_script_log_fatal "${logentry}" |
|
|
|
fn_script_log_fail "${logentry}" |
|
|
|
fn_print_fail_eol_nl |
|
|
|
else |
|
|
|
fn_script_log_pass ${logentry} |
|
|
@ -696,7 +696,7 @@ fn_mod_install_amxmodx_file() { |
|
|
|
echo "linux addons/amxmodx/dlls/amxmodx_mm_i386.so" >> "${modinstalldir}/addons/metamod/plugins.ini" |
|
|
|
exitcode=$? |
|
|
|
if [ "${exitcode}" != 0 ]; then |
|
|
|
fn_script_log_fatal "${logentry}" |
|
|
|
fn_script_log_fail "${logentry}" |
|
|
|
fn_print_fail_eol_nl |
|
|
|
else |
|
|
|
fn_script_log_pass ${logentry} |
|
|
@ -708,7 +708,7 @@ fn_mod_install_amxmodx_file() { |
|
|
|
echo "linux addons/amxmodx/dlls/amxmodx_mm_i386.so" > "${modinstalldir}/addons/metamod/plugins.ini" |
|
|
|
exitcode=$? |
|
|
|
if [ "${exitcode}" != 0 ]; then |
|
|
|
fn_script_log_fatal "${logentry}" |
|
|
|
fn_script_log_fail "${logentry}" |
|
|
|
fn_print_fail_eol_nl |
|
|
|
core_exit.sh |
|
|
|
else |
|
|
@ -733,7 +733,7 @@ fn_mod_remove_amxmodx_file() { |
|
|
|
sed -i '/^$/d' "${modinstalldir}/addons/metamod/plugins.ini" |
|
|
|
exitcode=$? |
|
|
|
if [ "${exitcode}" != 0 ]; then |
|
|
|
fn_script_log_fatal "${logentry}" |
|
|
|
fn_script_log_fail "${logentry}" |
|
|
|
fn_print_fail_eol_nl |
|
|
|
else |
|
|
|
fn_script_log_pass ${logentry} |
|
|
|