Skip to content

Commit

Permalink
beesh: Add optional mee_check() target when --check is set
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
mariux committed May 22, 2012
1 parent c399152 commit 6a6c1cb
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/beesh.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -611,6 +612,7 @@ OPTIONS=$(${BEE_BINDIR}/beegetopt --name beesh \
--option debug= \
--option archive-build \
--option no-archive-build \
--option check \
-- "$@")

if [ $? != 0 ] ; then
Expand All @@ -622,6 +624,7 @@ eval set -- "${OPTIONS}"

: ${OPT_INSTALL:="no"}
: ${OPT_CLEANUP:="no"}
: ${OPT_CHECK:="no"}
: ${OPT_ARCHIVE_BUILD:="yes"}

while true ; do
Expand Down Expand Up @@ -656,6 +659,10 @@ while true ; do
OPT_ARCHIVE_BUILD="yes"
shift
;;
--check)
OPT_CHECK="yes"
shift
;;
--debug)
DEBUG=$2
shift 2
Expand Down Expand Up @@ -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}"
Expand Down

0 comments on commit 6a6c1cb

Please sign in to comment.