diff options
| author | jdolecek <jdolecek@NetBSD.org> | 2000-11-06 15:46:38 +0000 |
|---|---|---|
| committer | jdolecek <jdolecek@NetBSD.org> | 2000-11-06 15:46:38 +0000 |
| commit | f3fb930debb6c3f85bd72a11cfab2b7192c15eaf (patch) | |
| tree | 916cbbe90843dd6e09237cb141a3166ea88f5547 /gnu | |
| parent | e9ea23788b1c9097abb1d44fdfb807f1881b17e5 (diff) | |
use uname -p and uname -m to get machine architecture and
machine type, falling back to /bin/arch, /bin/machine if they
exist and uname didn't return anything.
This solves bin/10614.
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/usr.bin/send-pr/send-pr.sh | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/gnu/usr.bin/send-pr/send-pr.sh b/gnu/usr.bin/send-pr/send-pr.sh index 5c7ffd124e3..d22ea79fca6 100644 --- a/gnu/usr.bin/send-pr/send-pr.sh +++ b/gnu/usr.bin/send-pr/send-pr.sh @@ -142,10 +142,22 @@ else fi # Find out some information. -SYSTEM=`( [ -f /bin/uname ] && /bin/uname -a ) || \ - ( [ -f /usr/bin/uname ] && /usr/bin/uname -a ) || echo ""` -ARCH=`[ -f /bin/arch ] && /bin/arch` -MACHINE=`[ -f /bin/machine ] && /bin/machine` +if [ -f /bin/uname ]; then + UNAME="/bin/uname" +elif [ -f /usr/bin/uname ]; then + UNAME="/usr/bin/uname" +else + UNAME="echo" +fi +SYSTEM=`$UNAME -a` +ARCH=`$UNAME -p` +if [ -z "$ARCH" -a -f /bin/arch ]; then + ARCH=`/bin/arch` +fi +MACHINE=`$UNAME -m` +if [ -z "$ARCH" -a -f /bin/machine ]; then + ARCH=`/bin/arch` +fi COMMAND=`echo $0 | sed -e 's,.*/,,'` USAGE="Usage: $COMMAND [-PVL] [-t address] [-f filename] [--request-id] |
