-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·48 lines (38 loc) · 1.26 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
#!/bin/bash
# Download the fetch-ke script
curl -L https://raw.githubusercontent.com/MemerGamer/fetch-ke/main/fetch-ke -o fetch-ke 2>/dev/null
# Make it executable
chmod +x fetch-ke
isTermux=$(echo $PREFIX | grep -o "com.termux")
# Check if it's Termux
if [[ -n $isTermux ]]; then
# If it's Termux, check if figlet is installed
if ! command -v figlet &>/dev/null; then
# If not, install it
apt install figlet
fi
# Check if ncurses is installed
if ! command -v ncurses &>/dev/null; then
# If not, install it
apt install ncurses-utils
fi
# Check if jq is installed
if ! command -v jq &>/dev/null; then
# If not, install it
apt install jq
fi
else
# Check if figlet is installed
if ! command -v figlet &>/dev/null; then
echo "figlet is not installed. please install it for fetch-ke to work properly!"
fi
# Check if ncurses is installed
if ! command -v ncurses &>/dev/null; then
echo "ncurses is not installed. please install it for fetch-ke to work properly!"
fi
# If it's not Termux
# Move it to /bin (requires sudo)
echo "please enter your sudo password to install: "
sudo mv fetch-ke /bin/fetch-ke
fi
echo "fetch-ke installed successfully."