Explorar o código

Trying recursive installed mods display

UltimateByte %!s(int64=9) %!d(string=hai) anos
pai
achega
1e83458917
Modificáronse 1 ficheiros con 24 adicións e 1 borrados
  1. 24 1
      lgsm/functions/command_mods_update.sh

+ 24 - 1
lgsm/functions/command_mods_update.sh

@@ -6,5 +6,28 @@
 # Description: Updates installed mods along with mods_list.sh.
 
 local commandname="MODS"
-local commandaction="Mod Update"
+local commandaction="Mods Update"
 local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
+
+check.sh
+mods_list.sh
+
+fn_mods_update_init(){
+	fn_script_log "Entering mods & addons update"
+	echo "================================="
+	echo "${gamename} mods & addons update"
+	echo ""
+  # Installed mod dir is "${modslockfilefullpath}"
+  # How many mods will be updated
+  installedmodscount="$(cat "${modslockfilefullpath}" | wc -l)"
+  # Loop showing mods to update
+  for (( installedmodsline=$installedmodscount; installedmodsline<=5; installedmodsline++ )); do
+  sed -n 'installedmodsline{p;q}' "${modslockfilefullpath}"
+  done
+  
+	currentmod="${usermodselect}"
+	fn_mod_get_info_from_command
+	fn_print_dots_nl "Updating ${modprettyname}"
+	sleep 1
+	fn_script_log "Updating ${modprettyname}."
+}