From 61eea4c9a5f25fc72607ebda2ac51445de300a83 Mon Sep 17 00:00:00 2001 From: Heavybullets8 Date: Thu, 11 Aug 2022 21:43:15 -0600 Subject: [PATCH] remove newstatus variable, just use status instead --- functions/update_apps.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/functions/update_apps.sh b/functions/update_apps.sh index 766ace10..ec807f5d 100644 --- a/functions/update_apps.sh +++ b/functions/update_apps.sh @@ -178,19 +178,16 @@ if [[ $rollback == "true" || "$startstatus" == "STOPPED" ]]; then old_status=$status elif [[ $verify == "true" ]]; then before_loop=$(head -n 1 temp.txt) - new_status=$old_status current_loop=0 - until [[ "$new_status" != "$old_status" || $current_loop -gt 3 ]] # Wait for a specific change to app status, or 3 refreshes of the file to go by. + until [[ "$status" != "$old_status" || $current_loop -gt 3 ]] # Wait for a specific change to app status, or 3 refreshes of the file to go by. do - new_status=$( grep "^$app_name," temp.txt | awk -F ',' '{print $2}') + status=$( grep "^$app_name," temp.txt | awk -F ',' '{print $2}') sleep 1 if ! echo -e "$(head -n 1 temp.txt)" | grep -qs ^"$before_loop" ; then before_loop=$(head -n 1 temp.txt) ((current_loop++)) fi done - old_status=$new_status - status=$( grep "^$app_name," temp.txt | awk -F ',' '{print $2}') unset verify fi (( count++ ))