-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·48 lines (42 loc) · 1.12 KB
/
install.sh
File metadata and controls
executable file
·48 lines (42 loc) · 1.12 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
41
42
43
44
45
46
47
48
#!/bin/bash
# Install shellfish scripts to /usr/local/bin
LOBSTER="🦞"
BLUE='\033[0;34m'
GREEN='\033[0;32m'
NC='\033[0m'
echo -e "${BLUE}${LOBSTER} Installing shellfish...${NC}"
echo ""
INSTALL_DIR="/usr/local/bin"
SCRIPTS=(
"claws-backup"
"tide-watch"
"molt"
)
# Check if running as root for /usr/local/bin
if [ "$EUID" -ne 0 ] && [ ! -w "$INSTALL_DIR" ]; then
echo "Note: You may need sudo to install to $INSTALL_DIR"
read -p "Continue? [y/N] " -n 1 -r
echo ""
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
exit 1
fi
fi
INSTALLED=0
for script in "${SCRIPTS[@]}"; do
if [ -f "$script" ]; then
echo -e "${BLUE}Installing:${NC} $script → $INSTALL_DIR/$script"
if cp "$script" "$INSTALL_DIR/" && chmod +x "$INSTALL_DIR/$script"; then
((INSTALLED++))
else
echo -e "${RED}Failed to install $script${NC}"
fi
fi
done
echo ""
echo -e "${GREEN}✅ Installed $INSTALLED scripts!${NC}"
echo ""
echo "Try: claws-backup --help"
echo " tide-watch --help"
echo " molt --help"
echo ""
echo -e "${LOBSTER} Business in the front, party in the back."