Shellfu/Bash/JAT data-driven testing mini-framework https://pagure.io/shellfu-bash-xcase

12345678910111213141516171819202122232425262728293031323334
  1. #!/bin/bash
  2. #shellcheck disable=SC2034
  3. # mkit - simple install helper
  4. # See LICENSE file for copyright and license details.
  5. init_core() {
  6. #
  7. # Load core module (or die)
  8. #
  9. #shellcheck disable=SC1090
  10. . "$MKIT_DIR/include/mkit.sh" \
  11. && . "$MKIT_DIR/include/vars.sh" \
  12. && return 0
  13. echo "failed to load core; check if MKIT_DIR is set properly: $MKIT_DIR" >&2
  14. exit 9
  15. }
  16. #
  17. # Path to MKit dir (where 'include' is)
  18. #
  19. MKIT_DIR=${MKIT_DIR:-$(dirname "$0")}
  20. init_core
  21. case "$1" in
  22. -V|--version-semver) echo "$MKIT_VERSION"; exit 0 ;;
  23. --version) echo "Mkit (Simple Makefile target helper) $MKIT_VERSION"
  24. exit 0 ;;
  25. esac
  26. mkit_init
  27. route "$@"