1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- #!/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")
-
- 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
- }
|