diff options
author | Michele Calgaro <[email protected]> | 2018-07-11 23:38:32 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2018-07-11 23:38:32 +0900 |
commit | eeaccbeddbaa2974406eb20cbb7beca3fb4a59f0 (patch) | |
tree | 510e0eea682ebf69263b187287873956394b5e7b /debian/_buildscripts/local/internals/_build_set_common.sh | |
parent | 02dbbffa606c3c52833bbaf3dc5c5a050f295dbf (diff) | |
download | tde-packaging-eeaccbeddbaa2974406eb20cbb7beca3fb4a59f0.tar.gz tde-packaging-eeaccbeddbaa2974406eb20cbb7beca3fb4a59f0.zip |
DEB build scripts: several enhancements as follow:
- major rework of update_repositories.sh script, which now supports
multiple branches and provide better feedback to user.
- added support for pre-built extra dependency packages. A user can now
use Slavek Banko's binary packages instead of building the extra
dependency locally. This removes a quite tedious process during the
setup of the building environment.
- bug fixes and more user friendly folder names.
- improved README to cover the complete process until TDE installation.
Special thanks to Gregory Guy <[email protected]> for testing and
feedback done so far.
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'debian/_buildscripts/local/internals/_build_set_common.sh')
-rwxr-xr-x | debian/_buildscripts/local/internals/_build_set_common.sh | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/debian/_buildscripts/local/internals/_build_set_common.sh b/debian/_buildscripts/local/internals/_build_set_common.sh new file mode 100755 index 000000000..4bc1ea3e8 --- /dev/null +++ b/debian/_buildscripts/local/internals/_build_set_common.sh @@ -0,0 +1,75 @@ +#!/bin/bash + +# Load common code and initialization +. ./internals/_build_common.sh +init_common + +_BUILDSET_TIMER=1 +_BUILDSET_TIME="--/--:--:--:---" + +parm_SKIP_FETCH="n" # if "y" skips N packages from the list +parm_SKIP_N=0 # this argument represents the number of packages to skip +SKIP_cnt=0 + + +#---------------------------- +# do_exit for set building +function do_exit() +{ + cd "$SCRIPT_DIR" + if [ $1 -eq 0 ]; then + echo -e "${CGray}#### Building process for set \"${0##*/}\" completed ####${CNone}" + else + echo -e "${CGray}#### Building process for set \"${0##*/}\" interrupted ($1) ####${CNone}" + fi + exit $1 +} + + +#---------------------------- +function set_log_start() +{ + echo -e "${CGray}#### Starting building process for set \"${0##*/}\" ####${CNone}" + echo + echo "---------- ${0##*/} ----------" >>"$LOG_BUILD_RESULT_FILENAME" + exec_time_start $_BUILDSET_TIMER +} + + +#---------------------------- +function set_log_end() +{ + exec_time_stop $_BUILDSET_TIMER "_BUILDSET_TIME" + echo " [$_BUILDSET_TIME] SET ${0##*/}" >>"$LOG_BUILD_RESULT_FILENAME" + echo >>"$LOG_BUILD_RESULT_FILENAME" + do_exit 0 +} + + +#---------------------------- +function build_module() +{ + if [ $parm_SKIP_N -gt 0 -a $SKIP_cnt -lt $parm_SKIP_N ]; then + SKIP_cnt=$((SKIP_cnt+1)) + else + ./build_module.sh "$BUILD_DEFAULT_OPTIONS $@" + echo + fi +} + + +#---------------------------- +# Check command line arguments +#---------------------------- +for arg in $@; do + if [ "$parm_SKIP_FETCH" = "y" ]; then + parm_SKIP_N=$arg + parm_SKIP_FETCH="n"BUILD_DEFAULT_OPTIONS + elif [ "$arg" = "-s" ]; then # skip first N packages + parm_SKIP_FETCH="y" + fi +done +if [ "$parm_SKIP_FETCH" = "y" ]; then + echo "Invalid command line arguments ($@)" + do_exit 3 +fi |