This commit is contained in:
marcusH
2026-06-14 12:35:47 +02:00
parent b30e4a7d31
commit 059e07c30e
+9 -2
View File
@@ -65,8 +65,15 @@ if [[ ! -f "$BIN" ]]; then
swift build -c release
fi
# expand ~ in workdir
WORKDIR="${WORKDIR/#\~/$HOME}"
# Keep workdir portable across machines/users: store paths under the current
# home directory as a literal "~", so each app expands it per-user at runtime
# (Swift's expandingTildeInPath). Note the shell may have already expanded a "~"
# you typed on the command line into an absolute $HOME path, so we normalize that
# back to "~" too. Paths outside $HOME stay absolute (genuinely machine-specific).
case "$WORKDIR" in
"$HOME") WORKDIR="~" ;;
"$HOME"/*) WORKDIR="~/${WORKDIR#"$HOME"/}" ;;
esac
# ---- assemble the .app bundle ---------------------------------------------
APP="$OUTDIR/$NAME.app"