imapfilter convenience wrapper

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. #!/bin/bash
  2. # mkit - simple install helper
  3. # See LICENSE file for copyright and license details.
  4. die() {
  5. echo "$@" && exit 9
  6. }
  7. #
  8. # Bump size (for vbump_? and release_?)
  9. #
  10. MKIT_BUMPSIZE=${MKIT_BUMPSIZE:-1}
  11. #
  12. # Debug mode (true|false)
  13. #
  14. MKIT_DEBUG=${MKIT_DEBUG:-false}
  15. #
  16. # Default deploy mode for files
  17. #
  18. MKIT_DEFAULT_MODE="644"
  19. #
  20. # Path to MKit dir (where 'include' is)
  21. #
  22. MKIT_DIR=${MKIT_DIR:-$(dirname "$0")}
  23. #
  24. # Dry mode (true|false)
  25. #
  26. # Set to true to not install anything. Implies MKIT_DEBUG.
  27. #
  28. MKIT_DRY=${MKIT_DRY:-false}
  29. #
  30. # Path to mkit.ini
  31. #
  32. MKIT_INI=${MKIT_INI:-mkit.ini}
  33. #
  34. # Limit ini expansion depth
  35. #
  36. # To avoid endless loops, this value is subtracted each
  37. # time ini() expands a reference; when zero is reached,
  38. # no more expansions happen.
  39. #
  40. MKIT_INI_EXPAND=2
  41. #
  42. # Path to MKit local config and temp
  43. #
  44. # Typically hidden in project root, here MKit can
  45. # save its temporary lists.
  46. #
  47. MKIT_LOCAL=${MKIT_LOCAL:-.mkit}
  48. #
  49. # Package name
  50. #
  51. # Used as base for tarball and in some default tokens.
  52. #
  53. MKIT_PROJ_PKGNAME=""
  54. #
  55. # This MKit version
  56. #
  57. MKIT_VERSION=0.0.17
  58. . "$MKIT_DIR/include/mkit.sh" || die "failed to init; check if MKIT_DIR is set properly: $MKIT_DIR"
  59. case "$1" in
  60. --version-semver) echo "$MKIT_VERSION"; exit 0 ;;
  61. --version) echo "Mkit (Simple Makefile target helper) $MKIT_VERSION"
  62. exit 0 ;;
  63. esac
  64. mkit_init
  65. route "$@"