Queer MD passionate about IT

generate_documentation.sh 808 B

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. # Get current directory
  3. this_script_directory=$(cd `dirname $0` && pwd)
  4. # Import variables from my_config.sh
  5. # `$python_virtual_environment`: python virtual environment directory for packaging
  6. # containing `python` and `pip`
  7. source "$this_script_directory/my_config.sh";
  8. # Ensure the success of importing procedure
  9. if [ -z "${python_virtual_environment}" ];
  10. then
  11. printf "Please set in ""my_config.sh"" the path to bot python virtual environment\n\nExample:\npython_virtual_environment=""path/to/virtual/env""\n";
  12. exit;
  13. fi
  14. "$python_virtual_environment/python" -m pdoc --html --force --output "$this_script_directory/temp" "$this_script_directory/ciclopibot";
  15. rm -rf documentation/;
  16. mv "$this_script_directory/temp/ciclopibot/" "$this_script_directory/documentation/";
  17. rm -rf temp/;