From f2dc5fd1a5333c927bffcd1e2f6fa3705f28d69b Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Sun, 15 Jan 2017 09:44:32 +0100 Subject: [PATCH] attempt to fix sed --- lgsm/functions/mods_core.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/mods_core.sh b/lgsm/functions/mods_core.sh index 082afb399..a24f88195 100644 --- a/lgsm/functions/mods_core.sh +++ b/lgsm/functions/mods_core.sh @@ -190,7 +190,7 @@ fn_postinstall_tasks(){ # Output to the user fn_print_information_nl "Rearranging ${modcommand}-files.list" fn_script_log_info "Rearranging ${modcommand}-files.list" - smremovefromlist="cfg;addons" + smremovefromlist="cfg;addons;" # Loop through every single line to find any of the files to remove from the list # that way these files won't get removed upon update or uninstall fileslistline=1 @@ -205,7 +205,7 @@ fn_postinstall_tasks(){ # If it matches if [ "${testline}" == "${smremovetestvar}" ]; then # Then delete the line! - sed -i "${testline}d" "${modsdatadir}/${modcommand}-files.list" + sed -i "/${testline}/d" "${modsdatadir}/${modcommand}-files.list" fi done let fileslistline=fileslistline+1