summaryrefslogtreecommitdiff
diff options
authorMichael Vogt <mvo@ubuntu.com>2019-08-22 13:05:21 +0200
committerMichael Vogt <mvo@ubuntu.com>2019-08-22 13:05:21 +0200
commit6490f86f916dd332c17edf2ec95476a54f89f75b (patch)
treefbe4aa846f828d45fb962b8ba561538ae8b0dcdd
parent5a0e6e10917696112e901dfcca4188761af2916a (diff)
mkversion.sh: use dpkg-parsechangelog only when it is availablemkversion-extra-checks
-rwxr-xr-xmkversion.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/mkversion.sh b/mkversion.sh
index 4e9d6ebd4e..c75bc07a0d 100755
--- a/mkversion.sh
+++ b/mkversion.sh
@@ -47,7 +47,9 @@ fi
# at this point we maybe in _build/src/github etc where we have no
# debian/changelog (dh-golang only exports the sources here)
# switch to the real source dir for the changelog parsing
-version_from_changelog="$(cd "$PKG_BUILDDIR"; dpkg-parsechangelog --show-field Version)";
+if command -v dpkg-parsechangelog >/dev/null; then
+ version_from_changelog="$(cd "$PKG_BUILDDIR"; dpkg-parsechangelog --show-field Version)";
+fi
# select version based on priority
if [ -n "$version_from_user" ]; then