-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
Β·46 lines (38 loc) Β· 932 Bytes
/
setup.sh
File metadata and controls
executable file
Β·46 lines (38 loc) Β· 932 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env bash
set -euo pipefail
echo "π§ pi-tools setup"
echo ""
check() {
if command -v "$1" &>/dev/null; then
echo " β
$1"
return 0
else
echo " β $1 β not found"
return 1
fi
}
install_brew() {
if command -v brew &>/dev/null; then
echo " π¦ brew install $1..."
brew install "$1" 2>&1 | tail -1
else
echo " β οΈ brew not found β install $1 manually"
return 1
fi
}
echo "Checking dependencies..."
echo ""
# Required
check rg || install_brew ripgrep
check fd || install_brew fd
check tree || install_brew tree
check tokei || install_brew tokei
check ast-grep || install_brew ast-grep
echo ""
echo "Optional:"
if ! check secrets; then
echo " π¦ Installing agent-secrets..."
curl -fsSL https://raw.githubusercontent.com/joelhooks/agent-secrets/main/install.sh | bash
fi
echo ""
echo "β
Done. Run: pi install git:github.com/joelhooks/pi-tools"