From 671fc3bc4e01ab608a3b272f5e78d3fd5929a2f0 Mon Sep 17 00:00:00 2001 From: Travis Cross Date: Fri, 17 Jan 2014 19:16:26 +0000 Subject: [PATCH] Add convenience option for building a small subset of modules --- debian/util.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/debian/util.sh b/debian/util.sh index 12f5948d57..3882c3081a 100755 --- a/debian/util.sh +++ b/debian/util.sh @@ -318,9 +318,9 @@ build_debs () { build_all () { local OPTIND OPTARG - local orig_opts="" dsc_opts="" deb_opts="" + local orig_opts="" dsc_opts="" deb_opts="" modlist="" local archs="" distros="" orig="" depinst=false par=false - while getopts 'a:bc:df:ijm:no:s:v:z:' o "$@"; do + while getopts 'a:bc:df:ijl:m:no:s:v:z:' o "$@"; do case "$o" in a) archs="$archs $OPTARG";; b) orig_opts="$orig_opts -b";; @@ -329,6 +329,7 @@ build_all () { f) dsc_opts="$dsc_opts -f$OPTARG";; i) depinst=true;; j) par=true;; + l) modlist="$OPTARG";; m) orig_opts="$orig_opts -m$OPTARG"; dsc_opts="$dsc_opts -m$OPTARG";; n) orig_opts="$orig_opts -n";; o) orig="$OPTARG";; @@ -344,6 +345,12 @@ build_all () { rsync git less cowbuilder ccache \ devscripts equivs build-essential [ -n "$orig" ] || orig="$(create_orig $orig_opts HEAD | tail -n1)" + if [ -n "$modlist" ]; then + local modtmp="$(mktemp /tmp/modules-XXXXXXXXXX.conf)" + > $modtmp + for m in "$modlist"; do printf '%s\n' "$m" >> $modtmp; done + dsc_opts="$dsc_opts -f${modtmp}"; fi + [ -n "$orig" ] || orig="$(create_orig $orig_opts HEAD | tail -n1)" mkdir -p ../log > ../log/changes echo; echo; echo; echo @@ -371,6 +378,7 @@ build_all () { done ! $par || wait fi + [ -z "$modlist" ] || rm -f $modtmp trap - EXIT cat ../log/changes } @@ -399,6 +407,7 @@ commands: Build only modules listed in this file -i Auto install build deps on host system -j Build debs in parallel + -l -m [ quicktest | non-dfsg ] Choose custom list of modules to build -n Nightly build