update
This commit is contained in:
parent
90847a4908
commit
97e68f958d
@ -1,14 +1,3 @@
|
|||||||
######################
|
|
||||||
# Setup configuration
|
|
||||||
####################
|
|
||||||
|
|
||||||
# enabled debug
|
|
||||||
# set -x
|
|
||||||
|
|
||||||
|
|
||||||
builder_init() {
|
|
||||||
}
|
|
||||||
|
|
||||||
#####################
|
#####################
|
||||||
# Call user entry point
|
# Call user entry point
|
||||||
####################
|
####################
|
||||||
@ -28,20 +17,20 @@ call_entry_point() {
|
|||||||
####################
|
####################
|
||||||
|
|
||||||
builder_read_config() {
|
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
|
# Check temp dir
|
||||||
test -d ${TMP_DIR}
|
test -d ${TMP_DIR}
|
||||||
builder_check_error "temp directory not available: $TMP_DIR"
|
builder_check_error "temp directory not available: $TMP_DIR"
|
||||||
|
|
||||||
# Source release configuration
|
# Source product release configuration
|
||||||
test -f ${BASEDIR}/release.cfg
|
test -f ${PRODUCT_DIR}/release.cfg
|
||||||
builder_check_error "can't read release configuration: ${BASEDIR}/release.cfg"
|
builder_check_error "can't read release configuration: ${PRODUCT_DIR}/release.cfg"
|
||||||
. $BASEDIR/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)
|
# Source local build configuration (must be done AFTER sourcing the release.cfg)
|
||||||
test -f "$BUILD_LOCAL_CFG"
|
test -f "$BUILD_LOCAL_CFG"
|
||||||
@ -199,7 +188,7 @@ builder_upload() {
|
|||||||
builder_commit() {
|
builder_commit() {
|
||||||
if test -d ".git"; then
|
if test -d ".git"; then
|
||||||
echo
|
echo
|
||||||
echo "builder_commit() not implemented yet."
|
# echo "builder_commit() not implemented yet."
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
22
builder/builder.sh
Normal file → Executable file
22
builder/builder.sh
Normal file → Executable file
@ -1,9 +1,14 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
#
|
||||||
|
|
||||||
|
# enabled debug
|
||||||
|
# set -x
|
||||||
|
|
||||||
#####################
|
#####################
|
||||||
# Main
|
# Main
|
||||||
####################
|
####################
|
||||||
main() {
|
builder_main() {
|
||||||
# read config
|
# read config
|
||||||
call_entry_point builder_read_config_pre
|
call_entry_point builder_read_config_pre
|
||||||
builder_read_config
|
builder_read_config
|
||||||
@ -34,21 +39,28 @@ main() {
|
|||||||
call_entry_point builder_commit_post
|
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
|
# read private build configuration
|
||||||
. $BUILD_LOCAL_CFG
|
. $BUILD_LOCAL_CFG
|
||||||
. $BUILDER_DIR/builder-lib.sh
|
. $BASEDIR/builder-lib.sh
|
||||||
|
|
||||||
# get target directory
|
# get target directory
|
||||||
PRODUCT_DIR=$1
|
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"
|
. "$PRODUCT_DIR/build-extension.sh"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# call main
|
||||||
builder_main
|
builder_main
|
||||||
|
|
||||||
# Exit
|
# exit
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user