Queer European MD passionate about IT

install.sh 990 B

1234567891011121314151617181920212223242526
  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. echo "Enter a valid Telegram bot token";
  18. read bot_token;
  19. echo "bot_token = \"$bot_token\"" >> "$passwords_file";
  20. # Run bot
  21. bash run_me.sh;