-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall.sh
60 lines (48 loc) · 2.23 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
#!/bin/bash
installLumine() {
echo "
██╗ ██╗ ██╗███╗ ███╗██╗███╗ ██╗███████╗
██║ ██║ ██║████╗ ████║██║████╗ ██║██╔════╝
██║ ██║ ██║██╔████╔██║██║██╔██╗ ██║█████╗
██║ ██║ ██║██║╚██╔╝██║██║██║╚██╗██║██╔══╝
███████╗╚██████╔╝██║ ╚═╝ ██║██║██║ ╚████║███████╗
╚══════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝╚══════╝
"
echo "🚀 Welcome to Lumine CLI installer! 🚀"
echo "✨ Installing Lumine..."
INSTALL_DIR="/usr/local/bin"
TEMP_DIR="/tmp/lumine"
if ! command -v git &> /dev/null; then
echo "❌ Git is not installed. Please install Git and try again."
exit 1
fi
if ! command -v go &> /dev/null; then
echo "❌ Go (Golang) is not installed. Please install Go and try again."
exit 1
fi
echo "✨ Cloning Lumine repository..."
git clone https://github.com/nexusrex18/lumine.git "$TEMP_DIR" || {
echo "❌ Failed to clone the Lumine repository. Check your internet connection"
exit 1
}
cd "$TEMP_DIR" || exit
echo "✨ Building Lumine CLI..."
go build -o lumine main.go || {
echo "❌ Failed to build Lumine CLI."
exit 1
}
echo "✨ Moving Lumine binary to $INSTALL_DIR..."
sudo mv lumine "$INSTALL_DIR/lumine" || {
echo "❌ Failed to move Lumine CLI to $INSTALL_DIR. Please check your permissions."
exit 1
}
echo "🧹 Cleaning up temporary files..."
rm -rf "$TEMP_DIR"
if command -v lumine &> /dev/null; then
echo "✨✨✨ Lumine installed successfully! 🎉"
echo "You can now run Lumine using the command: lumine"
else
echo "❌ Something went wrong during the installation. Please check the steps above."
fi
}
installLumine