From 02a8ec4d02ff2c432a9ff8f1c24cf25cbf828f9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Draszik?= Date: Mon, 3 Oct 2016 09:50:37 +0100 Subject: [PATCH] jdg-debc: works for foreign architecture packages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: André Draszik --- scripts/jdg-debc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/jdg-debc b/scripts/jdg-debc index ea60b83..29cc27f 100755 --- a/scripts/jdg-debc +++ b/scripts/jdg-debc @@ -13,12 +13,17 @@ fi CHANGES=$(find . -maxdepth 1 -name \*.changes ! -name \*_source.changes) +HOST_ARCH="$(dpkg-architecture -qDEB_HOST_ARCH)" +if [ -n "${HOST_ARCH}" ] && [ -n "${architecture}" ] && [ "${architecture}" != "${HOST_ARCH}" ] ; then + arch="-a ${architecture}" +fi + if [ -n "$CHANGES" ] >/dev/null 2>&1 ; then for file in $CHANGES ; do - debc "$file" + debc ${arch} "$file" done elif ls ./*.deb >/dev/null 2>&1 ; then - debc ./*.deb + debc ${arch} ./*.deb else echo "No changes and deb files found in $(pwd), ignoring." fi