From e229b2c7ea6586d532865e2e7d780105fb93d57b Mon Sep 17 00:00:00 2001
From: UltimateByte <robin.labadie@gmail.com>
Date: Sun, 15 Jan 2017 02:46:26 +0100
Subject: [PATCH] new attempt

---
 lgsm/functions/command_mods_update.sh | 27 +++++++++++++++------------
 1 file changed, 15 insertions(+), 12 deletions(-)

diff --git a/lgsm/functions/command_mods_update.sh b/lgsm/functions/command_mods_update.sh
index 26bf7ba69..c99162ae1 100644
--- a/lgsm/functions/command_mods_update.sh
+++ b/lgsm/functions/command_mods_update.sh
@@ -17,17 +17,20 @@ fn_mods_update_init(){
 	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
+	# Installed mod dir is "${modslockfilefullpath}"
+	# How many mods will be updated
+	installedmodscount="$(cat "${modslockfilefullpath}" | wc -l)"
+	# Loop showing mods to update
+	while [ $installedmodsline -lte $installedmodscount ]; do
+ 		sed -n 'installedmodsline{p;q}' "${modslockfilefullpath}"
+		let installedmodscount=installedmodscount+1 
+  	done
   
-	currentmod="${usermodselect}"
-	fn_mod_get_info_from_command
-	fn_print_dots_nl "Updating ${modprettyname}"
-	sleep 1
-	fn_script_log "Updating ${modprettyname}."
+	#currentmod="${usermodselect}"
+	#fn_mod_get_info_from_command
+	#fn_print_dots_nl "Updating ${modprettyname}"
+	#sleep 1
+	#fn_script_log "Updating ${modprettyname}."
 }
+
+fn_mods_update_init