simplify ARCH param for rhel/centos param can be x86_64 and amd64

for fedora/rhel/centos the main supported ARCH is x86_64. This patch allow
to call diskimage-builder with the above distro's with param ARCH=x86_64,
And also retain same behaiver when call with ARCH=amd64 as it translate
anyway to x86_64. Doing so wil simplify user expirience.

Change-Id: I229e0912434109b1b48a030bd35ad8dc1096a629
This commit is contained in:
Noam Angel 2016-11-01 16:19:44 +02:00 committed by Ian Wienand
parent 80976d9d44
commit d07d7ed15d
3 changed files with 5 additions and 5 deletions

View File

@ -9,10 +9,10 @@ set -o pipefail
[ -n "$ARCH" ]
[ -n "$TARGET_ROOT" ]
if [ 'amd64' = "$ARCH" ] ; then
if [[ "amd64 x86_64" =~ "$ARCH" ]]; then
ARCH="x86_64"
else
echo 'centos7 root element only support the amd64 $ARCH value.'
echo 'centos7 root element only support the x86_64 $ARCH value.'
exit 1
fi

View File

@ -9,10 +9,10 @@ set -o pipefail
[ -n "$ARCH" ]
[ -n "$TARGET_ROOT" ]
if [ 'amd64' = "$ARCH" ] ; then
if [[ "amd64 x86_64" =~ "$ARCH" ]]; then
ARCH="x86_64"
else
echo 'rhel7 root element only support the amd64 $ARCH value.'
echo 'rhel7 root element only support the x86_64 $ARCH value.'
exit 1
fi

View File

@ -9,7 +9,7 @@ set -o pipefail
if [ "i386" = "$ARCH" ]; then
basearch=i386
arch=i686
elif [ "amd64" = "$ARCH" ]; then
elif [[ "amd64 x86_64" =~ "$ARCH" ]]; then
basearch=x86_64
arch=x86_64
elif [[ "$ARCH" = "ppc64" ]]; then