-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env sh | ||
|
||
# | ||
# Ensure umu-launcher does not download its fetched resources more than once | ||
# when multiple processes of itself are created | ||
# | ||
|
||
tmp1=$(mktemp) | ||
tmp2=$(mktemp) | ||
|
||
UMU_LOG=debug GAMEID=umu-0 "$HOME/.local/bin/umu-run" wineboot -u 2> "$tmp1" & | ||
sleep 1 | ||
UMU_LOG=debug GAMEID=umu-0 "$HOME/.local/bin/umu-run" wineboot -u 2> "$tmp2" & | ||
wait | ||
|
||
grep "exited with wait status" "$tmp1" | ||
|
||
# Ensure the 2nd proc didn't download the runtime | ||
grep "\(latest\), please wait..." "$tmp2" | ||
if [ $? -ne 0 ]; then | ||
exit 1 | ||
fi | ||
|
||
grep "exited with wait status" "$tmp2" | ||
|
||
# Ensure the 2nd proc didn't download Proton | ||
grep "Downloading" "$tmp2" | ||
if [ $? -ne 0 ]; then | ||
exit 1 | ||
fi |