Quellcode durchsuchen

check fails in the loop and echo the right files amount

UltimateByte vor 9 Jahren
Ursprung
Commit
3c3d68fbdc
1 geänderte Dateien mit 6 neuen und 8 gelöschten Zeilen
  1. 6 8
      lgsm/functions/command_mods_remove.sh

+ 6 - 8
lgsm/functions/command_mods_remove.sh

@@ -75,19 +75,17 @@ while [ "${modfileline}" -le "${modsfilelistsize}" ]; do
 	if [ -f "${modinstalldir}/${currentfileremove}" ]||[ -d "${modinstalldir}/${currentfileremove}" ]; then
 		rm -rf "${modinstalldir}/${currentfileremove}"
 		local exitcode=$?
+		if [ ${exitcode} -ne 0 ]; then
+			fn_print_fail_eol_nl
+			core_exit.sh
+		else
+			fn_print_ok_eol_nl
+		fi
 	fi
 	tput rc; tput el
 	printf  "removing ${modprettyname} ${modfileline} / ${modsfilelistsize} : ${currentfileremove}..."
 	((modfileline++))
 done
-tput rc; tput ed;
-echo -ne "sed ${modprettyname} ${modfileline} / ${modsfilelistsize}..."
-if [ ${exitcode} -ne 0 ]; then
-	fn_print_fail_eol_nl
-	core_exit.sh
-else
-	fn_print_ok_eol_nl
-fi
 sleep 0.5
 
 # Remove file list