From a12e4fb3b6c6333866f21c9aa7e0e811c5c02ea1 Mon Sep 17 00:00:00 2001
From: Soispha <soispha@vhack.eu>
Date: Mon, 1 Jan 2024 21:02:37 +0100
Subject: fix(hm/pkgs/scr/ytc): Don't use while in a if situation

---
 hm/soispha/pkgs/scripts/wrappers/ytc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'hm/soispha/pkgs/scripts')

diff --git a/hm/soispha/pkgs/scripts/wrappers/ytc b/hm/soispha/pkgs/scripts/wrappers/ytc
index 44aeb358..ce7f9ba9 100755
--- a/hm/soispha/pkgs/scripts/wrappers/ytc
+++ b/hm/soispha/pkgs/scripts/wrappers/ytc
@@ -73,10 +73,10 @@ while read -r base; do
     printf "" > "$filename_file"
 
     if [ "$old_filename" ]; then
-        while [ "$(wc -l < "$files_to_play")" -gt "$CONCURRENT" ]; do
+        if [ "$(wc -l < "$files_to_play")" -gt "$CONCURRENT" ]; then
             msg2 "Waiting for '$pid' to finish as we already have '$(wc -l < "$files_to_play")' files cached"
             wait "$pid"
-        done
+        fi
     fi
 
     old_filename="$filename";
-- 
cgit 1.4.1