From 98f30f384362ecc102befe1b3f3e45f6988134f4 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Sun, 15 Jan 2017 20:09:48 +0100 Subject: [PATCH] clearing junk --- lgsm/functions/mods_core.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lgsm/functions/mods_core.sh b/lgsm/functions/mods_core.sh index 9482dd12e..5bde66b15 100644 --- a/lgsm/functions/mods_core.sh +++ b/lgsm/functions/mods_core.sh @@ -191,19 +191,16 @@ fn_postinstall_tasks(){ fn_print_dots "Rearranging ${modcommand}-files.list" fn_script_log_info "Rearranging ${modcommand}-files.list" removefromlist="cfg;addons;" - # Loop through files to remove and remove them from file list - # that way these files won't get removed upon update or uninstall + # Loop through files to remove from file list, + # that way these files won't get removed upon uninstall # How many elements to remove from list removefromlistamount="$(echo "${removefromlist}" | awk -F ';' '{ print NF }')" # Test all subvalue of "removefromlist" using the ";" separator for ((filesindex=1; filesindex < ${removefromlistamount}; filesindex++)); do # Put current file into test variable removefilevar="$( echo "${removefromlist}" | awk -F ';' -v x=${filesindex} '{ print $x }' )" - # If it matches - if [ "${testline}" == "${removefilevar}" ]; then - # Then delete matching line(s)! - sed -i "/^${testline}$/d" "${modsdatadir}/${modcommand}-files.list" - fi + # Then delete matching line(s)! + sed -i "/^${testline}$/d" "${modsdatadir}/${modcommand}-files.list" done fn_print_ok "Rearranging ${modcommand}-files.list" }