2008-07-18 12:15:21 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
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
|