-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSetup_Agent_Environment.command
More file actions
executable file
·40 lines (36 loc) · 1.47 KB
/
Copy pathSetup_Agent_Environment.command
File metadata and controls
executable file
·40 lines (36 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env bash
# ./Setup_Agent_Environment.command
# Double-click launcher for macOS (repo root).
# Does NOT require Node.js — Setup_Agent_Environment.sh runs a Bash wizard that can install Node.
#
# Notes for macOS:
# - .command files do NOT get Admin privileges automatically from Finder.
# This launcher announces that, then the bootstrap requests a GUI admin dialog + sudo.
# - Terminal stays open so password prompts and results remain visible.
DIR="$(cd "$(dirname "$0")" && pwd)"
cd "$DIR" || exit 1
echo
echo " Portable Web Toolkit — macOS setup"
echo " =================================="
echo " This launcher needs administrator access to install Node and tools."
echo " After you press Y, macOS will show a password / admin dialog."
echo " (Double-clicking a .command does not grant Admin by itself — that is normal.)"
echo
set +e
bash "$DIR/Setup_Agent_Environment.sh" "$@"
status=$?
set -e
echo
if [[ "$status" -eq 0 ]]; then
echo "[SUCCESS] Setup finished. You can close this window."
else
echo "[NOTICE] Setup exited with code $status. Review messages above."
echo " If admin/sudo was cancelled, rerun this .command and approve the password dialog."
fi
echo
# Keep Terminal open after double-click so results are readable.
# Skip pause for agent/--yes runs or non-interactive stdin.
if [[ -t 0 && " $* " != *" --yes "* && " $* " != *" --agent "* && " $* " != *" --non-interactive "* ]]; then
read -r -p "Press Enter to close this window..." _
fi
exit "$status"