do.sh 610 B

1234567891011121314151617181920212223242526272829
  1. #!/bin/bash
  2. # This script is an interface to any of the methods of lib.sh
  3. # Call this script as "do.sh method_from_lib" to execute any function from that library
  4. set -eu
  5. HERE="$(
  6. cd "$(dirname "${BASH_SOURCE[0]}")"
  7. pwd -P
  8. )"
  9. if ! command -v devenv >/dev/null 2>&1; then
  10. echo '
  11. Please install the devenv tool:
  12. https://github.com/getsentry/devenv#install
  13. '
  14. exit 1
  15. fi
  16. if ! [[ "$VIRTUAL_ENV" -ef "${HERE}/../.venv" ]]; then
  17. echo "
  18. Your sentry virtualenv isn't activated. You need to successfully run 'direnv allow'.
  19. "
  20. exit 1
  21. fi
  22. # shellcheck disable=SC1090
  23. source "${HERE}/lib.sh"
  24. "$@"