commands 739 B

12345678910111213141516171819202122232425262728293031
  1. #!/usr/bin/env bash
  2. set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
  3. case "$1" in
  4. help | robots.txt:help)
  5. help_content_func () {
  6. declare desc="return robots.txt plugin help content"
  7. cat<<help_content
  8. robots.txt:disallow <app>, Discourages web crawlers from indexing this app
  9. robots.txt:allow <app>, Doesn't discourage web crawlers from indexing this app
  10. help_content
  11. }
  12. if [[ $1 = "robots.txt:help" ]] ; then
  13. echo -e 'Usage: dokku robots.txt[:COMMAND]'
  14. echo ''
  15. echo 'Manage robots.txt for applications.'
  16. echo ''
  17. echo 'Additional commands:'
  18. help_content_func | sort | column -c2 -t -s,
  19. else
  20. help_content_func
  21. fi
  22. ;;
  23. *)
  24. exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
  25. ;;
  26. esac