Ultroid v0.7 Updates
Date: 30-8-2022 Co-Authored-By: Aditya <me@xditya.me> Co-Authored-By: Amit Sharma <48654350+buddhhu@users.noreply.github.com> Co-Authored-By: CyrusXD <79554993+Ashutosh1478@users.noreply.github.com> Co-Authored-By: Danish <danish@ultroid.tech> Co-Authored-By: TechiError <error@notavailable.live> Co-Authored-By: Arnab Paryali <arnabxd@pm.me>
This commit is contained in:
57
installer.sh
57
installer.sh
@@ -19,29 +19,71 @@ clone_repo(){
|
||||
if [ ! $BRANCH ]
|
||||
then export BRANCH="main"
|
||||
fi
|
||||
echo -e "\n\nCloning Ultroid ${BRANCH}... "
|
||||
if [ -d $DIR ]
|
||||
then
|
||||
echo -e $DIR "Already exists.."
|
||||
cd $DIR
|
||||
git pull
|
||||
currentbranch="$(git rev-parse --abbrev-ref HEAD)"
|
||||
if [ currentbranch != $BRANCH ]
|
||||
then
|
||||
git checkout $BRANCH
|
||||
fi
|
||||
if [ -d "addons" ]
|
||||
then
|
||||
cd addons
|
||||
git pull
|
||||
fi
|
||||
return
|
||||
fi
|
||||
echo -e "Cloning 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
|
||||
pip3 install -q --no-cache-dir -r $DIR/requirements.txt
|
||||
pip3 install -q -r $DIR/resources/startup/optional-requirements.txt
|
||||
}
|
||||
|
||||
railways_dep(){
|
||||
if [ $RAILWAY_STATIC_URL ]
|
||||
then
|
||||
echo -e "\n\nInstalling YouTube dependency... "
|
||||
pip3 install -q --no-cache-dir yt-dlp
|
||||
echo -e "Installing YouTube dependency... "
|
||||
pip3 install -q yt-dlp
|
||||
fi
|
||||
}
|
||||
|
||||
install_okteto_cli(){
|
||||
misc_install(){
|
||||
if [ $OKTETO_TOKEN ]
|
||||
then
|
||||
echo -e "\n\nInstalling Okteto-CLI... "
|
||||
echo -e "Installing Okteto-CLI... "
|
||||
curl https://get.okteto.com -sSfL | sh
|
||||
elif [ $VCBOT ]
|
||||
then
|
||||
if [ -d $DIR/vcbot ]
|
||||
then
|
||||
cd $DIR/vcbot
|
||||
git pull
|
||||
else
|
||||
echo -e "Cloning VCBOT.."
|
||||
git clone https://github.com/TeamUltroid/VcBot $DIR/vcbot
|
||||
fi
|
||||
pip3 install pytgcalls>=3.0.0.dev21 && pip3 install av -q --no-binary av
|
||||
fi
|
||||
}
|
||||
|
||||
dep_install(){
|
||||
echo -e "\n\nInstalling DB Requirement..."
|
||||
if [ $MONGO_URI ]
|
||||
then
|
||||
pip3 install -q pymongo[srv]
|
||||
elif [ $DATABASE_URL ]
|
||||
then
|
||||
pip3 install -q psycopg2-binary
|
||||
elif [ $REDIS_URI ]
|
||||
then
|
||||
pip3 install -q redis hiredis
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -49,7 +91,8 @@ main(){
|
||||
(clone_repo)
|
||||
(install_requirements)
|
||||
(railways_dep)
|
||||
(install_okteto_cli)
|
||||
(dep_install)
|
||||
(misc_install)
|
||||
}
|
||||
|
||||
main
|
||||
|
||||
Reference in New Issue
Block a user