-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathinstall.sh
executable file
·84 lines (71 loc) · 2.88 KB
/
install.sh
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/bin/bash
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
BLUE='\033[0;34m'
YELLOW='\033[0;33m'
NC='\033[0m'
# ASCII Art
echo -e "${RED}"
cat << "EOF"
⠠⣤⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠻⣶⡄⠀⠀⣼⠟⠁⠀⠀⠀⠀⠀
⠀⣄⣀⣠⣤⣴⣶⣦⠀⢰⣿⠁⠀⠀⠀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠠⣤⣤⣾⣷⣶⡾⠿⠾⠿⠗⠀⠀⠀⠀
⠀⠈⠛⠉⠁⠀⣿⠃⢀⣿⣷⣶⠶⣿⡿⠟⠃⠀⠀⠀⠀⠀⠀⠀⠀⢠⣬⣤⣤⣤⣿⣦⣴⣶⣶⡄⠀⠀⠀⠀
⠀⣤⣀⣀⣀⣼⣿⢀⣾⠃⠀⠀⢠⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣉⣉⣉⣉⣿⣥⣤⣤⣤⣄⠀⠀⠀⠀
⠀⢸⡟⠋⠉⠉⠁⠞⠁⠳⣄⢀⣾⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠛⣿⡋⠉⣿⡏⠉⣽⠟⠁⠀⠀⠀⠀
⠀⢸⡇⠀⠀⠀⣤⠀⠀⠀⢙⣿⣏⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣄⣀⣠⣤⣼⣿⣤⣿⣷⡾⠿⠶⠾⠿⢿⣦⠀
⠀⢸⣇⠀⠀⢀⣿⡀⠀⢠⡾⠋⢻⣧⡀⠀⠀⠀⠀⠀⠀⠀⠀⠙⠛⠉⢩⣤⣤⣤⣤⣤⣶⣶⣶⣄⠀⠀⠀⠀
⠀⠈⠻⠿⠿⠿⠟⢃⣴⠟⠁⠀⠀⠹⣿⣦⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⡉⠀⠀⠀⠀⢰⣿⠁⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠶⠋⠁⠀⠀⠀⠀⠀⠈⠛⠛⠛⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣧⣤⣤⣤⣴⣾⡇⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠉⠉
EOF
echo -e "${NC}"
sleep 2
echo -e "${BLUE}[+] Starting Kaizen installation...${NC}"
sleep 1
# Check for MPV
echo -e "${BLUE}[?] Checking for dependencies...${NC}"
if ! command -v mpv &> /dev/null; then
echo -e "${YELLOW}[!] Error: MPV is not installed. Please install MPV first.${NC}"
sleep 2
exit 1
fi
echo -e "${GREEN}[✓] MPV found${NC}"
sleep 1
# Create necessary directories
echo -e "${BLUE}[+] Creating directories...${NC}"
mkdir -p ~/.local/share/kaizen
mkdir -p ~/.config/kaizen
echo -e "${GREEN}[✓] Directories created${NC}"
sleep 1
# Copy and set permissions for maintenance scripts
echo -e "${BLUE}[+] Setting up maintenance scripts...${NC}"
cp update.sh uninstall.sh ~/.local/share/kaizen/
chmod +x ~/.local/share/kaizen/update.sh
chmod +x ~/.local/share/kaizen/uninstall.sh
echo -e "${GREEN}[✓] Maintenance scripts configured${NC}"
sleep 1
# Build using make
echo -e "${BLUE}[+] Building Kaizen...${NC}"
if ! make; then
echo -e "${YELLOW}[!] Error: Build failed${NC}"
exit 1
fi
echo -e "${GREEN}[✓] Build successful${NC}"
sleep 1
# Copy files
echo -e "${BLUE}[+] Installing Kaizen...${NC}"
sudo cp build/kaizen /usr/bin/
cp config.yaml ~/.config/kaizen/
echo -e "${GREEN}[✓] Kaizen installed${NC}"
sleep 1
# Copy version file
cp VERSION ~/.local/share/kaizen/
sleep 1
# Clean up build directory
echo -e "${BLUE}[+] Cleaning up...${NC}"
make clean
echo -e "${GREEN}[✓] Build directory cleaned${NC}"
sleep 1
echo -e "${GREEN}[+] Installation complete! You can now run Kaizen by typing 'kaizen' in your terminal.${NC}"