aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-08-07 14:41:44 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2019-08-07 14:41:44 +0200
commitc4228d11ff5df065ffce58a0df1e59c32ba593dd (patch)
treeec4dd4a6a95e68d09e5bd4a4300bfb1f187e17e8
parentc5527f07bf9dbdecfae13ae5e2c5904a5cf3bf40 (diff)
osmo-release.sh: Verify debian/rules dh_strip lines match LIBVERSION
-rwxr-xr-xosmo-release.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/osmo-release.sh b/osmo-release.sh
index d59083c0..e9602aa1 100755
--- a/osmo-release.sh
+++ b/osmo-release.sh
@@ -60,6 +60,7 @@ if [ "z$LIBVERS" != "z" ]; then
else
echo "WARN: Found $file_matches files matching debian/lib*$major.install for LIBVERSION=$libversion, manual check required!"
fi
+
control_matches="$(grep -e "Package" "${GIT_TOPDIR}/debian/control" | grep "lib" | grep "$major$" | wc -l)"
if [ "z$control_matches" = "z0" ]; then
echo "ERROR: Found no matching Package lib*$major in debian/control for LIBVERSION=$libversion"
@@ -69,6 +70,19 @@ if [ "z$LIBVERS" != "z" ]; then
else
echo "WARN: Found $file_matches files matching 'Package: lib*$major' in debian/control for LIBVERSION=$libversion, manual check required!"
fi
+
+ dhstrip_lib_total="$(grep -e "dh_strip" "${GIT_TOPDIR}/debian/rules" | grep "\-plib" | wc -l)"
+ dhstrip_lib_matches="$(grep -e "dh_strip" "${GIT_TOPDIR}/debian/rules" | grep "\-plib" | grep "$major" | wc -l)"
+ if [ "z$dhstrip_lib_total" != "z0" ]; then
+ if [ "z$dhstrip_lib_matches" = "z0" ] ; then
+ echo "ERROR: Found no matching 'dh_strip -plib*$major' line in debian/rules for LIBVERSION=$libversion"
+ exit 1
+ elif [ "z$dhstrip_lib_total" = "z1" ]; then
+ echo "OK: Found 'dh_strip -plib*$major' in debian/rules for LIBVERSION=$libversion"
+ else
+ echo "WARN: Found $dhstrip_lib_matches/$dhstrip_lib_total dh_strip matches 'dh_strip -plib*$major' in debian/rules for LIBVERSION=$libversion, manual check required!"
+ fi
+ fi
done
# catch and forward exit from pipe subshell "while read":
if [ $? -ne 0 ]; then