mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-31 02:33:44 +00:00
debian: add utility for building all distros and architectures
This commit is contained in:
parent
40a98d4b49
commit
496b9a9c78
37
debian/util.sh
vendored
37
debian/util.sh
vendored
@ -244,6 +244,42 @@ build_debs () {
|
|||||||
echo ${dsc}_${arch}.changes
|
echo ${dsc}_${arch}.changes
|
||||||
}
|
}
|
||||||
|
|
||||||
|
build_all () {
|
||||||
|
local OPTIND OPTARG
|
||||||
|
local orig_opts="" deb_opts=""
|
||||||
|
local archs="" distros=""
|
||||||
|
while getopts 'a:bc:dnv:z:' o "$@"; do
|
||||||
|
case "$o" in
|
||||||
|
a) archs="$archs $OPTARG";;
|
||||||
|
b) orig_opts="$orig_opts -b";;
|
||||||
|
c) distros="$distros $OPTARG";;
|
||||||
|
d) deb_opts="$deb_opts -d";;
|
||||||
|
n) orig_opts="$orig_opts -n";;
|
||||||
|
v) orig_opts="$orig_opts -v$OPTARG";;
|
||||||
|
z) orig_opts="$orig_opts -z$OPTARG";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift $(($OPTIND-1))
|
||||||
|
[ -n "$archs" ] || archs="amd64 i386"
|
||||||
|
[ -n "$distros" ] || distros="sid wheezy squeeze"
|
||||||
|
local acc_changes=""
|
||||||
|
local orig="$(create_orig $orig_opts HEAD | tail -n1)"
|
||||||
|
if [ "${orig:0:2}" = ".." ]; then
|
||||||
|
for distro in $distros; do
|
||||||
|
local dsc="$(create_dsc $distro $orig | tail -n1)"
|
||||||
|
if [ "${dsc:0:2}" = ".." ]; then
|
||||||
|
for arch in $archs; do
|
||||||
|
local changes="$(build_debs $deb_opts $distro $dsc $arch | tail -n1)"
|
||||||
|
if [ "${changes:0:2}" = ".." ]; then
|
||||||
|
acc_changes="$acc_changes $changes"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
echo "${acc_changes:1}"
|
||||||
|
}
|
||||||
|
|
||||||
while getopts 'd' o "$@"; do
|
while getopts 'd' o "$@"; do
|
||||||
case "$o" in
|
case "$o" in
|
||||||
d) set -vx;;
|
d) set -vx;;
|
||||||
@ -255,6 +291,7 @@ cmd="$1"
|
|||||||
shift
|
shift
|
||||||
case "$cmd" in
|
case "$cmd" in
|
||||||
archive-orig) archive_orig "$@" ;;
|
archive-orig) archive_orig "$@" ;;
|
||||||
|
build-all) build_all "$@" ;;
|
||||||
build-debs) build_debs "$@" ;;
|
build-debs) build_debs "$@" ;;
|
||||||
create-dbg-pkgs) create_dbg_pkgs ;;
|
create-dbg-pkgs) create_dbg_pkgs ;;
|
||||||
create-dsc) create_dsc "$@" ;;
|
create-dsc) create_dsc "$@" ;;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user