debian: add option to control make/bootstrap -j settings
This commit is contained in:
parent
9f578ca440
commit
25287f3828
|
@ -187,10 +187,11 @@ EOF
|
||||||
create_dsc () {
|
create_dsc () {
|
||||||
{
|
{
|
||||||
set -e
|
set -e
|
||||||
local OPTIND OPTARG modules_list=""
|
local OPTIND OPTARG modules_list="" speed="normal"
|
||||||
while getopts 'm:' o "$@"; do
|
while getopts 'm:s:' o "$@"; do
|
||||||
case "$o" in
|
case "$o" in
|
||||||
m) modules_list="$OPTARG";;
|
m) modules_list="$OPTARG";;
|
||||||
|
s) speed="$OPTARG";;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
shift $(($OPTIND-1))
|
shift $(($OPTIND-1))
|
||||||
|
@ -204,6 +205,13 @@ create_dsc () {
|
||||||
set_modules_${modules_list}
|
set_modules_${modules_list}
|
||||||
fi
|
fi
|
||||||
(cd debian && ./bootstrap.sh -c $distro)
|
(cd debian && ./bootstrap.sh -c $distro)
|
||||||
|
case "$speed" in
|
||||||
|
paranoid) sed -i ./debian/rules \
|
||||||
|
-e '/\.stamp-bootstrap:/{:l2 n; /\.\/bootstrap.sh -j/{s/ -j//; :l3 n; b l3}; b l2};' ;;
|
||||||
|
reckless) sed -i ./debian/rules \
|
||||||
|
-e '/\.stamp-build:/{:l2 n; /make/{s/$/ -j/; :l3 n; b l3}; b l2};' ;;
|
||||||
|
esac
|
||||||
|
git add debian/rules
|
||||||
dch -b -m -v "$dver" --force-distribution -D "$suite" "Nightly build."
|
dch -b -m -v "$dver" --force-distribution -D "$suite" "Nightly build."
|
||||||
git add debian/changelog && git commit -m "nightly v$orig_ver"
|
git add debian/changelog && git commit -m "nightly v$orig_ver"
|
||||||
dpkg-source -i.* -Zxz -z9 -b .
|
dpkg-source -i.* -Zxz -z9 -b .
|
||||||
|
@ -275,7 +283,7 @@ build_all () {
|
||||||
local OPTIND OPTARG
|
local OPTIND OPTARG
|
||||||
local orig_opts="" dsc_opts="" deb_opts=""
|
local orig_opts="" dsc_opts="" deb_opts=""
|
||||||
local archs="" distros=""
|
local archs="" distros=""
|
||||||
while getopts 'a:bc:dnm:v:z:' o "$@"; do
|
while getopts 'a:bc:dnm:s:v:z:' o "$@"; do
|
||||||
case "$o" in
|
case "$o" in
|
||||||
a) archs="$archs $OPTARG";;
|
a) archs="$archs $OPTARG";;
|
||||||
b) orig_opts="$orig_opts -b";;
|
b) orig_opts="$orig_opts -b";;
|
||||||
|
@ -283,6 +291,7 @@ build_all () {
|
||||||
d) deb_opts="$deb_opts -d";;
|
d) deb_opts="$deb_opts -d";;
|
||||||
n) orig_opts="$orig_opts -n";;
|
n) orig_opts="$orig_opts -n";;
|
||||||
m) dsc_opts="$dsc_opts -m$OPTARG";;
|
m) dsc_opts="$dsc_opts -m$OPTARG";;
|
||||||
|
s) dsc_opts="$dsc_opts -s$OPTARG";;
|
||||||
v) orig_opts="$orig_opts -v$OPTARG";;
|
v) orig_opts="$orig_opts -v$OPTARG";;
|
||||||
z) orig_opts="$orig_opts -z$OPTARG";;
|
z) orig_opts="$orig_opts -z$OPTARG";;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in New Issue