#!/bin/bash . "$MKIT_DIR/include/build.sh" || die "cannot import build.sh" . "$MKIT_DIR/include/deploy.sh" || die "cannot import deploy.sh" . "$MKIT_DIR/include/release.sh" || die "cannot import release.sh" . "$MKIT_DIR/include/ini.sh" || die "cannot import ini.sh" MKIT_INI=${MKIT_INI:-mkit.ini} MKIT_INI_EXPAND=2 MKIT_PKGNAME=$(ini 1value "ENV:PKGNAME") MKIT_PROJNAME=$(ini 1value "ENV:PROJNAME") MKIT_DEFAULT_MODE="644" mkit_init() { # # Do basic initialization # # Check for ini file, load variables from config.mk # test -f "$MKIT_INI" || die "cannot find mkit.ini: $MKIT_INI" tmp=$(mktemp) sed -e 's/ = /=/' < config.mk > "$tmp" . "$tmp" rm -f "$tmp" } 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 }