123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- #!/bin/bash
-
- . mkit/include/build.sh || die "cannot import build.sh"
- . mkit/include/deploy.sh || die "cannot import deploy.sh"
- . mkit/include/release.sh || die "cannot import release.sh"
- . mkit/include/ini.sh || die "cannot import ini.sh"
-
- MKIT_INI=${MKIT_INI:-mkit/config.ini}
- MKIT_INI_EXPAND=2
- MKIT_PKGNAME=$(ini 1value "ENV:PKGNAME")
- MKIT_PROJNAME=$(ini 1value "ENV:PROJNAME")
- MKIT_DEFAULT_MODE="644"
-
- configure() {
- #
- # Load variables fdom config.mk
- #
- tmp=$(mktemp)
- sed -e 's/ = /=/' < config.mk > $tmp
- . $tmp
- rm -f $tmp
- PREFIX="$(readlink -f "$PREFIX")"
- }
-
- die() {
- #
- # Exit with message and non-zero exit status
- #
- echo "fatal: $@" >&2
- exit 4
- }
-
- warn() {
- #
- # Print warning message
- #
- echo "$@" >&2
- }
-
- route() {
- #
- # Call correct function based on $1
- #
- case $1 in
- build|build_manpages|clean|dist|install|release_?|uninstall)
- $1
- ;;
- *)
- echo "usage: $(basename $0) build|clean|dist|install|uninstall" >&2
- esac
- }
|