From 97e68f958d9682b0370b53b13c8cde579773def6 Mon Sep 17 00:00:00 2001 From: Daniel Schwager Date: Wed, 25 Jan 2012 23:23:38 +0100 Subject: [PATCH] update --- builder/builder-lib.sh | 29 +++++++++-------------------- builder/builder.sh | 22 +++++++++++++++++----- 2 files changed, 26 insertions(+), 25 deletions(-) mode change 100644 => 100755 builder/builder.sh diff --git a/builder/builder-lib.sh b/builder/builder-lib.sh index 719ecec..0f9019c 100644 --- a/builder/builder-lib.sh +++ b/builder/builder-lib.sh @@ -1,14 +1,3 @@ -###################### -# Setup configuration -#################### - -# enabled debug -# set -x - - -builder_init() { -} - ##################### # Call user entry point #################### @@ -28,20 +17,20 @@ call_entry_point() { #################### builder_read_config() { - # get the 'real' directory this program stored in (resolve symbolic links) - PRG=$(readlink -f $0) - BASEDIR=`dirname "$PRG"` - BASEDIR=`cd "$BASEDIR" && pwd` # Check temp dir test -d ${TMP_DIR} builder_check_error "temp directory not available: $TMP_DIR" - # Source release configuration - test -f ${BASEDIR}/release.cfg - builder_check_error "can't read release configuration: ${BASEDIR}/release.cfg" - . $BASEDIR/release.cfg + # Source product release configuration + test -f ${PRODUCT_DIR}/release.cfg + builder_check_error "can't read release configuration: ${PRODUCT_DIR}/release.cfg" + . $PRODUCT_DIR/release.cfg + # Source product build configuration + test -f ${PRODUCT_DIR}/build.cfg + builder_check_error "can't read release configuration: ${PRODUCT_DIR}/build.cfg" + . $PRODUCT_DIR/build.cfg # Source local build configuration (must be done AFTER sourcing the release.cfg) test -f "$BUILD_LOCAL_CFG" @@ -199,7 +188,7 @@ builder_upload() { builder_commit() { if test -d ".git"; then echo - echo "builder_commit() not implemented yet." + # echo "builder_commit() not implemented yet." fi } diff --git a/builder/builder.sh b/builder/builder.sh old mode 100644 new mode 100755 index 4c7a017..d5855f4 --- a/builder/builder.sh +++ b/builder/builder.sh @@ -1,9 +1,14 @@ #!/bin/bash +# +# + +# enabled debug +# set -x ##################### # Main #################### -main() { +builder_main() { # read config call_entry_point builder_read_config_pre builder_read_config @@ -34,21 +39,28 @@ main() { call_entry_point builder_commit_post } +# get the 'real' directory this program stored in (resolve symbolic links) +PRG=$(readlink -f $0) +BASEDIR=`dirname "$PRG"` +BASEDIR=`cd "$BASEDIR" && pwd` # read private build configuration . $BUILD_LOCAL_CFG -. $BUILDER_DIR/builder-lib.sh +. $BASEDIR/builder-lib.sh # get target directory PRODUCT_DIR=$1 -if [ -f "$PRODUCT_DIR/build-extension.sh" ] ; +test -d $PRODUCT_DIR +builder_check_error "no opsi product directory specified: $PRODUCT_DIR" + +if [ -f "$PRODUCT_DIR/build-extension.sh" ] ; then . "$PRODUCT_DIR/build-extension.sh" fi - +# call main builder_main -# Exit +# exit exit 0