-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_mikero.sh
More file actions
executable file
·77 lines (65 loc) · 3.02 KB
/
install_mikero.sh
File metadata and controls
executable file
·77 lines (65 loc) · 3.02 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
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
#!/bin/bash
# ⚔️ UKSFTA Mikero Tools Automated Installer
# Installs extractpbo, derap, and required libraries for Linux.
set -e
MIKERO_VERSION="0.10.13"
TEMP_DIR="/tmp/mikero_install"
# Using the specific verified download link
INSTALL_URL="https://mikero.bytex.digital/api/download?filename=depbo-tools-${MIKERO_VERSION}-linux-amd64.tgz"
echo -e "\033[1;34m"
echo " ⚔️ UKSF TASKFORCE ALPHA | MIKERO TOOLS INSTALLER"
echo " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo -e "\033[0m"
# 1. Prepare Environment
echo "📂 Preparing temporary workspace..."
rm -rf "$TEMP_DIR" && mkdir -p "$TEMP_DIR"
cd "$TEMP_DIR"
# 2. Locate or Download Tools
# Broad search for any existing Mikero assets to avoid blocked downloads
echo "🔍 Searching for local Mikero assets..."
FOUND_PATH=$(find "$HOME" -name "depbo-tools-*" -not -path "*/.local/share/Trash/*" | head -n 1)
if [ -n "$FOUND_PATH" ]; then
echo "📦 Found local asset: $FOUND_PATH"
if [ -d "$FOUND_PATH" ]; then
cp -r "$FOUND_PATH" .
cd "$(basename "$FOUND_PATH")"
else
cp "$FOUND_PATH" mikero_asset.tgz
tar -xzf mikero_asset.tgz
cd depbo-tools-*
fi
else
echo "📥 Downloading Mikero Tools v${MIKERO_VERSION}..."
# Using the provided URL with robust headers
curl -L -H "User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" \
-o mikero.tgz "$INSTALL_URL"
# Check if download was successful (not an empty or html error page)
if [ ! -s mikero.tgz ] || grep -q "<html" mikero.tgz; then
echo "❌ Error: Download blocked or failed. Please download manually and place in Downloads."
exit 1
fi
echo "📦 Extracting binaries..."
tar -xzf mikero.tgz
# Find the extracted directory name dynamically
VERSION_DIR=$(find . -maxdepth 1 -type d -name "depbo-tools-*" | head -n 1)
if [ -z "$VERSION_DIR" ]; then
echo "❌ Error: Could not find extracted directory."
exit 1
fi
cd "$VERSION_DIR"
fi
# 4. Install Libraries
echo "🔧 Installing shared libraries (requires sudo)..."
# Use find to be path-agnostic
sudo find lib -name "*.so*" -exec cp -v {} /usr/local/lib/ \;
sudo ldconfig
# 5. Install Binaries
echo "🚀 Installing command-line tools..."
sudo find bin -type f -exec cp -v {} /usr/local/bin/ \;
# 6. Cleanup
echo "🧹 Cleaning up..."
rm -rf "$TEMP_DIR"
echo " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo -e "\033[1;32m🎉 Success! Mikero Tools are now installed.\033[0m"
echo " Commands available: extractpbo, derap, make pbo, etc."
echo " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"