summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2019-04-04 10:45:05 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2019-07-04 12:34:23 +0200
commit3d33a05ed7323c75ac612114106aa6cedee77114 (patch)
tree4ca3272a61aeeec8e01679d09c7b8257bc36c72b
parentf2789b7ff098dbdbb267e3b33abfa7e0a91688b5 (diff)
downloadOSELAS.Toolchain-3d33a05ed7323c75ac612114106aa6cedee77114.tar.gz
OSELAS.Toolchain-3d33a05ed7323c75ac612114106aa6cedee77114.tar.xz
gencontrol.sh: make sure the package name does not contain upper-case letters
Otherwise dpkg-gencontrol will abort the build. This can happen when the Version contains XX before an official release. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rwxr-xr-xdebian/bin/gencontrol.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/debian/bin/gencontrol.sh b/debian/bin/gencontrol.sh
index 0f54e9c..320fe8a 100755
--- a/debian/bin/gencontrol.sh
+++ b/debian/bin/gencontrol.sh
@@ -12,7 +12,8 @@ if [ "${vendor}" != "Debian" -a "${vendor}" != "Ubuntu" ]; then
die "This script only works on Debian"
fi
-toolchain_version=$(dpkg-parsechangelog -SVersion | sed -e 's/-.*$//')
+toolchain_path_version=$(dpkg-parsechangelog -SVersion | sed -e 's/-.*$//')
+toolchain_version="$(tr A-Z a-z <<< "${toolchain_path_version}")"
newcontrol=$(mktemp debian/control.XXXXXXXXX)
trap 'rm -v -- "$newcontrol"' INT QUIT EXIT
@@ -54,7 +55,7 @@ Depends: $pkg
Description: Meta package depending on latest OSELAS Toolchain for ${gnutriplet}
EOF
- echo "/opt/OSELAS.Toolchain-${toolchain_version}/${gnutriplet}" > "debian/${pkg}.install"
+ echo "/opt/OSELAS.Toolchain-${toolchain_path_version}/${gnutriplet}" > "debian/${pkg}.install"
done
if ! cmp -s "$newcontrol" "debian/control"; then