app.skel 1.2KB

12345678910111213141516171819202122232425262728293031323334
  1. #!/bin/bash
  2. #shellcheck disable=SC1090,SC2034
  3. . "$(sfpath)" || exit 3
  4. {
  5. SATURNIN_APP_CODENAME="__MKIT_PROJ_CODENAME__"
  6. SATURNIN_APP_TAGLINE="__MKIT_PROJ_TAGLINE__"
  7. SATURNIN_APP_VERSION="__MKIT_PROJ_VERSION__"
  8. SATURNIN_APP_GIT_HASH="__MKIT_PROJ_GIT_LASTHASH__"
  9. SATURNIN_CACHE_HOME=${SATURNIN_CACHE_HOME:-"__SATURNIN_CACHE_HOME__"}
  10. SATURNIN_CONFIG_HOME=${SATURNIN_CONFIG_HOME:-"__SATURNIN_CONFIG_HOME__"}
  11. SATURNIN_DATA_HOME=${SATURNIN_DATA_HOME:-"__SATURNIN_DATA_HOME__"}
  12. SATURNIN_META_HELP=${SATURNIN_META_HELP:-"+__SATURNIN_SHARE__/help"}
  13. SATURNIN_LIBEXEC=${SATURNIN_LIBEXEC:-"__SATURNIN_LIBEXEC__"}
  14. SATURNIN_LIBEXEC_PREFIX="__MKIT_PROJ_PKGNAME__-"
  15. PRETTY_USAGE="subcommand"
  16. PRETTY_DEBUG_EXCLUDE="$PRETTY_DEBUG_EXCLUDE,inigrep,saturnin"
  17. }
  18. shellfu import saturnin
  19. test -n "$SATURNIN_CONF_PATH" || SATURNIN_CONF_PATH="$(
  20. saturnin__conf_mkpath \
  21. "__SATURNIN_CONFIG_HOME__/ini.d" \
  22. "__SATURNIN_CONFIG_HOME__" \
  23. "__SATURNIN_CONFIG_LOCAL__" \
  24. "__SATURNIN_SHARE__/ini.d"
  25. )"
  26. export SATURNIN_CONF_PATH SHELLFU_PATH PRETTY_USAGE PRETTY_DEBUG_EXCLUDE \
  27. SATURNIN_CACHE_HOME SATURNIN_CONFIG_HOME SATURNIN_DATA_HOME
  28. saturnin__main "$@"