summaryrefslogtreecommitdiffstats
path: root/debian/_buildscripts/local/scripts/99_build_TDE.sh
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2018-06-20 19:13:35 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2018-06-20 19:16:10 +0900
commite324c2e7e496f30183b678e8fa1a3c10cdb80e5b (patch)
tree50fda18f6c1de7e73755e080fbc55a28833582ff /debian/_buildscripts/local/scripts/99_build_TDE.sh
parent77398a607fe09f49f40349bce398661c43e77143 (diff)
downloadtde-packaging-e324c2e7e496f30183b678e8fa1a3c10cdb80e5b.tar.gz
tde-packaging-e324c2e7e496f30183b678e8fa1a3c10cdb80e5b.zip
DEB build scripts: major update aimed at simplifying the use for
non-root users. Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'debian/_buildscripts/local/scripts/99_build_TDE.sh')
-rwxr-xr-xdebian/_buildscripts/local/scripts/99_build_TDE.sh89
1 files changed, 89 insertions, 0 deletions
diff --git a/debian/_buildscripts/local/scripts/99_build_TDE.sh b/debian/_buildscripts/local/scripts/99_build_TDE.sh
new file mode 100755
index 000000000..32d4e4375
--- /dev/null
+++ b/debian/_buildscripts/local/scripts/99_build_TDE.sh
@@ -0,0 +1,89 @@
+#!/bin/bash
+
+# Load common code and initialization
+. ./internals/_build_common.sh
+init_common
+
+_BUILDALL_TIMER=2
+_BUILDALL_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 TDE completed ####${CNone}"
+ else
+ echo -e "${CGray}#### Building process for TDE interrupted ($1) ####${CNone}"
+ fi
+ exit $1
+}
+
+
+#----------------------------
+function set_log_start()
+{
+ echo -e "${CGray}#### Starting building process for TDE ####${CNone}"
+ echo
+ echo "********** TDE **********" >>"$LOG_RESULT_FILENAME"
+ exec_time_start $_BUILDALL_TIMER
+}
+
+
+#----------------------------
+function set_log_end()
+{
+ exec_time_stop $_BUILDALL_TIMER "_BUILDALL_TIME"
+ echo " [$_BUILDALL_TIME] All TDE " >>"$LOG_RESULT_FILENAME"
+ echo >>"$LOG_RESULT_FILENAME"
+ do_exit 0
+}
+
+
+#----------------------------
+function build_set()
+{
+ if [ $parm_SKIP_N -gt 0 -a $SKIP_cnt -lt $parm_SKIP_N ]; then
+ SKIP_cnt=$((SKIP_cnt+1))
+ else
+ ./build_module.sh -g -lr "$@"
+ echo
+ fi
+}
+
+
+#----------------------------
+# Check command line arguments
+#----------------------------
+for arg in $@; do
+ if [ "$parm_SKIP_FETCH" = "y" ]; then
+ parm_SKIP_N=$arg
+ parm_SKIP_FETCH="n"
+ 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
+
+
+#----------------------------
+# Build TDE
+#----------------------------
+set_log_start
+for setname in `find . -maxdepth 1 -type f -iname '[01]*' | sort`; do
+ if [ $parm_SKIP_N -gt 0 -a $SKIP_cnt -lt $parm_SKIP_N ]; then
+ SKIP_cnt=$((SKIP_cnt+1))
+ else
+ $setname
+ fi
+done
+set_log_end