summaryrefslogtreecommitdiffstats
path: root/debian/bin/gencontrol.sh
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2019-03-21 11:30:15 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2019-03-21 11:30:15 +0100
commit0fd5dedfaf107064d6ce9ea67654ff04b2860c8a (patch)
tree4ead14c0b372eac530d3e92ada2cd795666eb150 /debian/bin/gencontrol.sh
parent161a4f3f88a3f2d9172ee5a6086ad57602003a5f (diff)
downloadOSELAS.Toolchain-0fd5dedfaf107064d6ce9ea67654ff04b2860c8a.tar.gz
OSELAS.Toolchain-0fd5dedfaf107064d6ce9ea67654ff04b2860c8a.tar.xz
allow building toolchains for Ubuntu
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'debian/bin/gencontrol.sh')
-rwxr-xr-xdebian/bin/gencontrol.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/debian/bin/gencontrol.sh b/debian/bin/gencontrol.sh
index b203cc1..0f54e9c 100755
--- a/debian/bin/gencontrol.sh
+++ b/debian/bin/gencontrol.sh
@@ -7,9 +7,12 @@ die() {
# This script assumes to have CWD = toplevel of OSELAS.Toolchain
test -f debian/changelog || die "debian/changelog not found"
-test "$(dpkg-vendor --query Vendor)" = "Debian" || die "This script only works on Debian"
+vendor="$(dpkg-vendor --query Vendor)"
+if [ "${vendor}" != "Debian" -a "${vendor}" != "Ubuntu" ]; then
+ die "This script only works on Debian"
+fi
-toolchain_version=$(dpkg-parsechangelog -SVersion | sed -e 's/-[^-]*$//')
+toolchain_version=$(dpkg-parsechangelog -SVersion | sed -e 's/-.*$//')
newcontrol=$(mktemp debian/control.XXXXXXXXX)
trap 'rm -v -- "$newcontrol"' INT QUIT EXIT