printf"Note, if these gave any errors, playwright may not be officially supported on your OS, check this issues page for support\nhttps://github.com/microsoft/playwright/issues"
printf"Your OS is not supported\n Please install python3, pip3 and git manually\n After that, run the script again with the -pb option to install python and playwright dependencies\n If you want to add support for your OS, please open a pull request on github\n
https://github.com/elebumm/RedditVideoMakerBot"
exit1
fi
}
# Main function
function install_main(){
# Print that are installing
echo"Installing..."
# if -y (assume yes) continue
if[[ ASSUME_YES -eq 1]];then
echo"Assuming yes"
# else, ask if they want to continue
else
echo"Continue? (y/n)"
read answer
# if the answer is not yes, then exit
if["$answer" !="y"];then
echo"Aborting"
exit1
fi
fi
# if the -d (only dependencies) options is selected install just the dependencies
if[[ DEPS_ONLY -eq 1]];then
echo"Installing only dependencies"
install_deps
elif[[ PYTHON_ONLY -eq 1]];then
# if the -p (only python dependencies) options is selected install just the python dependencies and playwright
echo"Installing only python dependencies"
install_python_dep
install_playwright
# if the -b (only the bot) options is selected install just the bot
elif[[ JUST_BOT -eq 1]];then
echo"Installing only the bot"
get_the_bot
# if the -l (bot and python) options is selected install just the bot and python dependencies
elif[[ BOT_AND_PYTHON -eq 1]];then
echo"Installing only the bot and python dependencies"
get_the_bot
install_python_dep
# else, install everything
else
echo"Installing all"
install_deps
get_the_bot
install_python_dep
install_playwright
fi
DIR="./RedditVideoMakerBot"
if[ -d "$DIR"];then
printf"\nThe bot is already installed, want to run it?"