From 6a6c1cbbcd87317492770321c4c1939d408274ad Mon Sep 17 00:00:00 2001 From: Marius Tolzmann Date: Tue, 22 May 2012 11:38:04 +0200 Subject: [PATCH] beesh: Add optional mee_check() target when --check is set If the bee-file (beesh) is called with --check the special step "check" will be called after calling "build" and before calling "install". so if mee_check(), mee_check_pre() or mee_check_post() are defined they will be called if --check is activated. As long as --check is not activated checks are disabled. to globally enable checks you may set OPT_CHECK to any value but "no", e.g. OPT_CHECK="yes". we may rename those environment variables at a later time so please don't depend on them. (it's just a quick fix - will be stable for bee-2.0) --- src/beesh.sh.in | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/beesh.sh.in b/src/beesh.sh.in index d5c74a2..b453b2d 100644 --- a/src/beesh.sh.in +++ b/src/beesh.sh.in @@ -94,6 +94,7 @@ function show_help() { -f, --force-install same as -i; bee_install is invoked with --force -h, --help display this help --no-archive-build do not archive the build directory + --check run mee_check, mee_check_pre and mee_check_post EOF } @@ -611,6 +612,7 @@ OPTIONS=$(${BEE_BINDIR}/beegetopt --name beesh \ --option debug= \ --option archive-build \ --option no-archive-build \ + --option check \ -- "$@") if [ $? != 0 ] ; then @@ -622,6 +624,7 @@ eval set -- "${OPTIONS}" : ${OPT_INSTALL:="no"} : ${OPT_CLEANUP:="no"} +: ${OPT_CHECK:="no"} : ${OPT_ARCHIVE_BUILD:="yes"} while true ; do @@ -656,6 +659,10 @@ while true ; do OPT_ARCHIVE_BUILD="yes" shift ;; + --check) + OPT_CHECK="yes" + shift + ;; --debug) DEBUG=$2 shift 2 @@ -790,6 +797,11 @@ cd ${B} bee_run configure bee_run build + +if [ "${OPT_CHECK}" != "no" ] ; then + bee_run check +fi + bee_run install print_info "changing to image directory: ${D}"