Fix architecture filter.

If we are using uname to collect the name of the architecture, we need
to filter its output to make it consistent with dpkg. This is now
happening in the right place to avoid a spurious warning on i386 builds.

Change-Id: Iae80dbfb757fc068155730686841c742acb7a6a2
This commit is contained in:
Chris Jones 2013-05-02 20:52:47 +01:00
parent 55993863fc
commit 488c462dcd

View File

@ -18,20 +18,19 @@ if [ -f /etc/debian_version ]; then
_ARCH=$(dpkg --print-architecture)
else
_ARCH=$(uname -m)
fi
ARCH=${ARCH:-$_ARCH}
case $ARCH in
case $_ARCH in
"x86_64")
ARCH="amd64"
_ARCH="amd64"
;;
"armv"*)
ARCH="armhf"
_ARCH="armhf"
;;
*)
echo "WARNING: Unknown architecture: $ARCH"
echo "WARNING: Unknown architecture: $_ARCH"
;;
esac
esac
fi
ARCH=${ARCH:-$_ARCH}
export ARCH
FS_TYPE=${FS_TYPE:-ext4}