Skip to content

Commit 5a4eb3b

Browse files
authored
Update update.sh
1 parent 42b1cae commit 5a4eb3b

1 file changed

Lines changed: 13 additions & 21 deletions

File tree

update/update.sh

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
11
#!/bin/bash
2-
###########- COLOR CODE -##############
3-
colornow=$(cat /etc/rmbl/theme/color.conf)
4-
NC="\e[0m"
5-
RED="\033[0;31m"
6-
COLOR1="$(cat /etc/rmbl/theme/$colornow | grep -w "TEXT" | cut -d: -f2|sed 's/ //g')"
7-
COLBG1="$(cat /etc/rmbl/theme/$colornow | grep -w "BG" | cut -d: -f2|sed 's/ //g')"
8-
WH='\033[1;37m'
9-
###########- END COLOR CODE -##########
102

11-
echo -e "$COLOR1┌─────────────────────────────────────────────────┐${NC}"
12-
echo -e "$COLOR1${NC} ${WH} UPDATE SCRIPT BY CALIPHDEV ${NC} $COLOR1${NC}"
13-
echo -e "$COLOR1└─────────────────────────────────────────────────┘${NC}"
14-
echo -e ""
15-
echo -e " \033[1;91m Update Script...\033[1;37m"
3+
echo "┌─────────────────────────────────────────────────┐"
4+
echo " UPDATE SCRIPT BY CALIPHDEV "
5+
echo "└─────────────────────────────────────────────────┘"
6+
echo ""
7+
echo "Update Script..."
168

179
# Define base URL
1810
BASE_URL="https://autoscript.caliphdev.com"
@@ -23,13 +15,13 @@ update_file() {
2315
local file_url=$2
2416
local tmp_file="/tmp/$(basename "$file_path")"
2517

26-
echo -e " Downloading $(basename "$file_path")..."
18+
echo "Downloading $(basename "$file_path")..."
2719
if wget -q -O "$tmp_file" "$file_url"; then
2820
mv "$tmp_file" "$file_path"
2921
chmod +x "$file_path"
30-
echo -e " [${WH}OK${NC}] Updated $file_path"
22+
echo "[OK] Updated $file_path"
3123
else
32-
echo -e " [${RED}FAIL${NC}] Failed to download $file_path"
24+
echo "[FAIL] Failed to download $file_path"
3325
fi
3426
}
3527

@@ -56,16 +48,16 @@ update_file "/usr/bin/m-sstp" "$BASE_URL/menu/m-sstp.sh"
5648
update_file "/usr/bin/m-update" "$BASE_URL/update/update.sh"
5749

5850
# Update version file
59-
echo -e " Updating Version..."
51+
echo "Updating Version..."
6052
serverV=$(curl -sS "$BASE_URL/menu/versi")
6153
if [ -n "$serverV" ]; then
6254
echo "$serverV" > /opt/.ver
63-
echo -e " [${WH}OK${NC}] Version updated to $serverV"
55+
echo "[OK] Version updated to $serverV"
6456
else
65-
echo -e " [${RED}FAIL${NC}] Failed to fetch version"
57+
echo "[FAIL] Failed to fetch version"
6658
fi
6759

68-
echo -e ""
69-
echo -e " \033[1;91m Update Done...\033[1;37m"
60+
echo ""
61+
echo "Update Done..."
7062
sleep 2
7163
menu

0 commit comments

Comments
 (0)