wait for editor log to exist

This commit is contained in:
Cat Flynn 2021-02-01 19:36:39 +00:00
parent e681a3f306
commit c8b029fe7e
1 changed files with 6 additions and 0 deletions

View File

@ -21,6 +21,12 @@ open -g $editorpath --args \
-logFile $editorlogpath \
-projectPath "$(pwd)/game"
# wait for editor log to exist
while [ ! -f $editorlog ]
do
sleep 1
done
# use a safe directory that is automatically removed by the shell when the script exists
work="$(mktemp -d)" || exit $?
trap "rm -rf '$work'" exit