-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·30 lines (25 loc) · 987 Bytes
/
Copy pathinstall.sh
File metadata and controls
executable file
·30 lines (25 loc) · 987 Bytes
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
#!/bin/bash
# One-line installer for LidAwake:
# curl -fsSL https://raw.githubusercontent.com/deezeddd/LidAwake-Mac/main/install.sh | bash
# Downloads the source, builds it locally (a few seconds), installs to ~/Applications.
set -e
if ! command -v swiftc >/dev/null 2>&1; then
echo "LidAwake builds from source and needs the Xcode Command Line Tools."
echo "Install them first with: xcode-select --install"
echo "Then re-run this installer."
exit 1
fi
TMP=$(mktemp -d)
trap 'rm -rf "$TMP"' EXIT
echo "Downloading LidAwake..."
curl -fsSL https://github.com/deezeddd/LidAwake-Mac/archive/refs/heads/main.tar.gz | tar -xz -C "$TMP" --strip-components=1
cd "$TMP"
./build.sh
echo
echo "Installed: ~/Applications/LidAwake.app"
echo
echo "Recommended one-time step (lets the toggle work without a password prompt):"
echo " bash ~/Applications/LidAwake.app/Contents/Resources/setup-permissions.sh"
echo
echo "Launch it with:"
echo " open ~/Applications/LidAwake.app"