-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInstall.command
More file actions
executable file
·35 lines (29 loc) · 1.14 KB
/
Copy pathInstall.command
File metadata and controls
executable file
·35 lines (29 loc) · 1.14 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
#!/bin/bash
set -e
echo "======================================"
echo " Agents Sleep Preventer Installer"
echo "======================================"
echo ""
# Copy app to Applications
echo "→ Copying app to /Applications..."
cp -R "$(dirname "$0")/AgentsSleepPreventer.app" /Applications/
# Copy CLI to /usr/local/bin. Use `install -m` instead of `cp` + `chmod`
# so the mode is set at create time — eliminates the brief race window
# where the file is on disk with the source's mode bits but not yet
# chmod'd. (L2 from the security review.)
echo "→ Installing CLI tool..."
sudo install -d -m 755 /usr/local/bin
sudo install -m 755 "/Applications/AgentsSleepPreventer.app/Contents/MacOS/asp" /usr/local/bin/asp
sudo install -m 755 "/Applications/AgentsSleepPreventer.app/Contents/MacOS/asp" /usr/local/bin/agents-sleep-preventer
# Run install
echo "→ Configuring Claude Code hooks..."
/usr/local/bin/asp install
# Open the app
echo "→ Launching app..."
open /Applications/AgentsSleepPreventer.app
echo ""
echo "✅ Installation complete!"
echo ""
echo "Restart Claude Code to activate sleep prevention."
echo ""
read -p "Press Enter to close..."