From a433a25ca701783c2304e70aab425a0ace051105 Mon Sep 17 00:00:00 2001 From: Johannes Lundberg Date: Mon, 13 Mar 2023 08:55:08 -0700 Subject: [PATCH] Get arch from system when building debian package (#298) --- deb_from_installation.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/deb_from_installation.sh b/deb_from_installation.sh index 053de42..2c15961 100755 --- a/deb_from_installation.sh +++ b/deb_from_installation.sh @@ -32,10 +32,12 @@ if [ ! -d $INSTALL_DIR ] ; then exit 1 fi +ARCH=$(dpkg --print-architecture) + rm -rf build/pkg mkdir -p build/pkg/opt mkdir -p build/pkg/DEBIAN sed -e s/VERSION/$VERSION/ wasi-sdk.control > build/pkg/DEBIAN/control cp -R $INSTALL_DIR build/pkg/opt/ -cd build && dpkg-deb -b pkg wasi-sdk_$VERSION\_amd64.deb && cd .. -mv build/wasi-sdk_$VERSION\_amd64.deb $OUTDIR/ +cd build && dpkg-deb -b pkg wasi-sdk_$VERSION\_$ARCH\.deb && cd .. +mv build/wasi-sdk_$VERSION\_$ARCH\.deb $OUTDIR/