Jelajahi Sumber

More UI modifications

Daniel Gibbs 9 tahun lalu
induk
melakukan
ae864bb92b
2 mengubah file dengan 11 tambahan dan 12 penghapusan
  1. 9 10
      lgsm/functions/command_mods_remove.sh
  2. 2 2
      lgsm/functions/mods_core.sh

+ 9 - 10
lgsm/functions/command_mods_remove.sh

@@ -74,19 +74,18 @@ while [ "${modfileline}" -le "${modsfilelistsize}" ]; do
 	fn_script_log "Removing: ${modinstalldir}/${currentfileremove}"
 	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
+		((exitcode=$?))
 	fi
 	tput rc; tput el
-	printf  "removing ${modprettyname} ${modfileline} / ${modsfilelistsize} : ${currentfileremove}..."
+	printf "removing ${modprettyname} ${modfileline} / ${modsfilelistsize} : ${currentfileremove}..."
 	((modfileline++))
 done
-fn_print_ok_eol_nl
+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
 echo -en "removing ${modcommand}-files.txt..."
@@ -102,7 +101,7 @@ else
 fi
 
 # Remove mods from installed mods list
-echo -en "removing ${modcommand} from ${modslockfile}..."
+echo -en "removing ${modcommand} from ${modsinstalledlist}..."
 sleep 0.5
 fn_script_log "Removing: ${modcommand} from ${modsinstalledlist}"
 sed -i "/^${modcommand}$/d" "${modsinstalledlistfullpath}"

+ 2 - 2
lgsm/functions/mods_core.sh

@@ -423,9 +423,9 @@ fn_mods_check_installed(){
 	# If no mods are found
 	if [ ${installedmodscount} -eq 0 ]; then
 		echo ""
-		fn_print_information_nl "No installed mods or addons were found"
+		fn_print_failure_nl "No installed mods or addons were found"
 		echo " * Install mods using LGSM first with: ./${selfname} mods-install"
-		fn_script_log_info "No installed mods or addons were found."
+		fn_script_log_fail "No installed mods or addons were found."
 		core_exit.sh
 	fi
 }