Co-Authored-By: Amit Sharma <48654350+buddhhu@users.noreply.github.com> Co-Authored-By: MMETMA <79155572+MMETMA@users.noreply.github.com> Co-Authored-By: Aditya <me@xditya.me> Co-Authored-By: marat2509 <93652988+marat2509@users.noreply.github.com> Co-Authored-By: smartman_ru <14003491+smartmanru@users.noreply.github.com> Co-Authored-By: Flasho <75789819+flashokillerify@users.noreply.github.com> Co-Authored-By: ÁÑÑÍHÌLÅTØR SPÄRK <75305464+annihilatorrrr@users.noreply.github.com>
55 lines
1.2 KiB
Bash
55 lines
1.2 KiB
Bash
#!/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
|