Skip to content

armgit / soju

Public Imported from GitHub
0

Play Windows games on Apple Silicon Macs. Free, open-source app that installs the official Battle.net, Steam, Epic and GOG launchers and lists your games in one library.

update: re-exec the refreshed update.sh before touching the engine

mikey929c82d3e481b7
diff --git a/scripts/update.sh b/scripts/update.sh
index 9e96f9bd1b3..9abe34ecfc9 100755
--- a/scripts/update.sh
+++ b/scripts/update.sh
@@ -12,6 +12,13 @@ TTY=/dev/tty
say(){ printf '\n\033[1m%s\033[0m\n' "$*"; }
# ---------- 1. Scripts ----------
+# Once the scripts are refreshed, the rest of this run must use the new ones
+# (the engine carry-over in particular changes between versions), so step 1
+# re-executes the fresh update.sh with this marker and skips itself.
+if [ "${1:-}" = "--scripts-updated" ]; then
+ shift
+ say "[1/2] Scripts updated"
+else
say "[1/2] Updating the Soju scripts"
if [ -e "$ROOT/.git" ]; then # a directory, or a file for worktrees/submodules
echo " git checkout at $ROOT"
@@ -32,11 +39,13 @@ else
rm -rf "$ROOT.old"; mv "$ROOT" "$ROOT.old"; mv "$tmp" "$ROOT"; rm -rf "$ROOT.old"
tmp=""
echo " scripts updated"
+ exec bash "$ROOT/scripts/update.sh" --scripts-updated "$@"
else
echo " download failed; skipping the scripts update"
fi
[ -n "$tmp" ] && rm -rf "$tmp"
fi
+fi
# ---------- 2. Engine ----------
say "[2/2] Checking the engine"