forked from TeamUltroid/Ultroid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
installer.sh
54 lines (46 loc) · 1.17 KB
/
installer.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
#!/usr/bin/env bash
REPO="https://github.com/TeamUltroid/Ultroid.git"
DIR="/root/TeamUltroid"
spinner(){
local pid=$!
while [ "$(ps a | awk '{print $1}' | grep $pid)" ];
do
for i in "Ooooo" "oOooo" "ooOoo" "oooOo" "ooooO" "oooOo" "ooOoo" "oOooo" "Ooooo"
do
echo -ne "\r• $i"
sleep 0.2
done
done
}
clone_repo(){
if [ ! $BRANCH ]
then export BRANCH="main"
fi
echo -e "\n\nCloning Ultroid ${BRANCH}... "
git clone -b $BRANCH $REPO $DIR
}
install_requirements(){
echo -e "\n\nInstalling requirements... "
pip3 install -q --no-cache-dir -r $DIR/requirements.txt && pip3 install av -q --no-binary av
}
railways_dep(){
if [ ! $RAILWAY_STATIC_URL ]
then
echo -e "\n\nInstalling YouTube dependency... "
pip3 install -q --no-cache-dir yt-dlp
fi
}
install_okteto_cli(){
if [ $OKTETO_TOKEN ]
then
echo -e "\n\nInstalling Okteto-CLI... "
curl https://get.okteto.com -sSfL | sh
fi
}
main(){
(clone_repo) & spinner
(install_requirements) & spinner
(railways_dep) & spinner
(install_okteto_cli) & spinner
}
main