From 7f7bc2123c6674efac8a32687b9dc86ee89a90b5 Mon Sep 17 00:00:00 2001 From: Cat Flynn Date: Sat, 30 Jan 2021 15:19:19 +0000 Subject: [PATCH] wait for unity processes to die --- ci/build.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ci/build.sh b/ci/build.sh index 7a5fb82..0046e9b 100644 --- a/ci/build.sh +++ b/ci/build.sh @@ -7,11 +7,12 @@ editorlogpath="$HOME/Library/Logs/Unity/Editor.log" editorpath="/Applications/Unity/Hub/Editor/$unityversion/Unity.app" # find and kill existing unity instances -if pgrep -x Unity -then - echo "terminating existing unity processes..." +echo "terminating existing unity processes..." +while pgrep -x Unity > /dev/null +do kill $(pgrep Unity) -fi + sleep 1 +done # remove previous Editor.log echo "removing previous editor log..."