#!/bin/bash # # # enabled debug # set -x ##################### # Main #################### builder_main() { # read config call_entry_point builder_read_config_pre builder_read_config call_entry_point builder_read_config_post # Check if the package is still build test ! -f ${OPSI_REPOS_PRODUCT_DIR}/${OPSI_REPOS_FILE_PATTERN} builder_check_error "package ${OPSI_REPOS_PRODUCT_DIR}/${OPSI_REPOS_FILE_PATTERN} already generated" # download and process dist files call_entry_point builder_download_dist_files_pre builder_download_dist_files call_entry_point builder_download_dist_files_post # Start building call_entry_point builder_package_pre builder_package call_entry_point builder_package_post # Upload to repos call_entry_point builder_upload_pre builder_upload call_entry_point builder_upload_post # git commit call_entry_point builder_commit_pre builder_commit 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 . $BASEDIR/builder-lib.sh # get target directory PRODUCT_DIR=$1 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 0