From 897ae4653bfb0f5aad3478beb98e040e815c11f7 Mon Sep 17 00:00:00 2001 From: Roy <88516395+moraroy@users.noreply.github.com> Date: Thu, 9 May 2024 13:47:42 -0700 Subject: [PATCH] cleaner bnet --- NonSteamLaunchers.sh | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/NonSteamLaunchers.sh b/NonSteamLaunchers.sh index dfed66c..8823e80 100755 --- a/NonSteamLaunchers.sh +++ b/NonSteamLaunchers.sh @@ -1903,23 +1903,17 @@ if [[ $options == *"Battle.net"* ]]; then echo "Running BATTLE file using Proton with the /passive option" "$STEAM_RUNTIME" "$proton_dir/proton" run "$battle_file" Battle.net-Setup.exe --lang=enUS --installpath="C:\Program Files (x86)\Battle.net" - # Wait for the process to finish or timeout after a certain number of attempts - max_attempts=20 - attempt=0 while true; do if pgrep -f "Battle.net.exe" || pgrep -f "BlizzardError.exe" > /dev/null; then pkill -f "Battle.net.exe" || pkill -f "BlizzardError.exe" break fi sleep 1 - ((attempt++)) - if [ "$attempt" -ge "$max_attempts" ]; then - echo "Timeout: Battle.net process did not terminate." - break - fi done + + # Wait for the bnet file to finish running + wait fi -wait # wait for Google Chrome to finish wait