Queer European MD passionate about IT

install.sh 998 B

12345678910111213141516171819202122232425
  1. #!/bin/bash
  2. # Get current directory
  3. this_script_directory=$(cd "$(dirname "$0")" && pwd);
  4. cd "$this_script_directory" || exit 1;
  5. configuration_file="$this_script_directory/my_config.sh";
  6. passwords_file="$this_script_directory/ciclopibot/data/passwords.py";
  7. # Create intermediate path for passwords_file, if it does not exist
  8. mkdir -p "$this_script_directory/ciclopibot/data/";
  9. echo "Enter a name for your virtual environment";
  10. read venv_name;
  11. python3 -m venv "$venv_name";
  12. "$venv_name"/bin/pip install -r "$this_script_directory/requirements.txt";
  13. # Please note that this will work only in a Unix-like operating system.
  14. # Other systems may require a different path.
  15. echo "python_virtual_environment=\"$(pwd)/$venv_name/bin\";" >> "$configuration_file";
  16. echo "python_script=\"$this_script_directory/ciclopibot/bot.py\";" >> "$configuration_file";
  17. read -r "Enter a valid Telegram bot token " bot_token;
  18. echo "bot_token = \"$bot_token\"" >> "$passwords_file";
  19. # Run bot
  20. bash run_me.sh;