-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
38 lines (30 loc) · 885 Bytes
/
install.sh
File metadata and controls
38 lines (30 loc) · 885 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
#!/bin/bash
REPO_URL="https://github.com/49mg/ops.git"
BINARY_NAME="ops"
INSTALL_DIR="/usr/local/bin"
TEMP_DIR="ops_build_tmp"
echo "📥 Oh Please, Saving you... Downloading OPS..."
mkdir -p /tmp/$TEMP_DIR
cd /tmp/$TEMP_DIR || exit
if git clone "$REPO_URL" .; then
echo "✅ Repository cloned successfully."
else
echo "❌ Failed to clone repository."
exit 1
fi
echo "🛠️ Compiling $BINARY_NAME..."
if make; then
echo "✅ Compiled successfully."
else
echo "❌ Compilation failed."
exit 1
fi
echo "🚀 Installing to $INSTALL_DIR (sudo required)..."
sudo mv "$BINARY_NAME" "$INSTALL_DIR/"
sudo chmod +x "$INSTALL_DIR/$BINARY_NAME"
cd /tmp
rm -rf "$TEMP_DIR"
echo "-----------------------------------------------"
echo "🎉 Installation Complete!"
echo "Run: $BINARY_NAME <service_name> -s"
echo "-----------------------------------------------"