2008-07-18 12:15:21 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2009-08-01 11:17:24 +02:00
|
|
|
#############################################################################
|
|
|
|
# Copyright (c) 2003-2005,2009 Novell, Inc.
|
|
|
|
# All Rights Reserved.
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of version 2 of the GNU General Public License as
|
|
|
|
# published by the Free Software Foundation.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, contact Novell, Inc.
|
|
|
|
#
|
|
|
|
# To contact Novell about this file by physical or electronic mail,
|
|
|
|
# you may find current contact information at www.novell.com
|
|
|
|
#############################################################################
|
|
|
|
|
2009-05-20 10:59:36 +02:00
|
|
|
# With --list, list all known architectures, otherwise print the generic
|
|
|
|
# name for this architecture (or the one specified on command line).
|
2008-07-18 12:15:21 +02:00
|
|
|
|
|
|
|
if [ "$1" = "--list" ]; then
|
|
|
|
# List all known architectures
|
|
|
|
echo i386 mips{,64} sparc{,64} ppc{,64} s390{,x} ia64 x86_64 alpha parisc
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2009-05-20 10:59:36 +02:00
|
|
|
if [ -n "$1" ]; then
|
|
|
|
ARCH="$1"
|
|
|
|
else
|
|
|
|
ARCH="`arch`"
|
2008-07-18 12:15:21 +02:00
|
|
|
fi
|
2009-05-20 10:59:36 +02:00
|
|
|
case "$ARCH" in
|
|
|
|
# from rpm --eval '%ix86'
|
|
|
|
i?86 | pentium3 | pentium4 | athlon | geode)
|
|
|
|
echo i386
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "$ARCH"
|
|
|
|
;;
|
|
|
|
esac
|