about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2024-01-01 21:02:37 +0100
committerSoispha <soispha@vhack.eu>2024-01-01 21:02:37 +0100
commita12e4fb3b6c6333866f21c9aa7e0e811c5c02ea1 (patch)
tree7f62beb013b3b015304573bd0ea4155eb604d9c9
parentfix(hm/pkgs/scr/ytc): Add default volume and unrestrict filenames (diff)
downloadnixos-config-a12e4fb3b6c6333866f21c9aa7e0e811c5c02ea1.tar.gz
nixos-config-a12e4fb3b6c6333866f21c9aa7e0e811c5c02ea1.zip
fix(hm/pkgs/scr/ytc): Don't use while in a if situation
-rwxr-xr-xhm/soispha/pkgs/scripts/wrappers/ytc4
1 files changed, 2 insertions, 2 deletions
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";