| @@ -1,18 +1,18 @@ | | | @@ -1,18 +1,18 @@ |
1 | : | | 1 | : |
2 | # derrived from /etc/rc_d/os.sh | | 2 | # derrived from /etc/rc_d/os.sh |
3 | | | 3 | |
4 | # RCSid: | | 4 | # RCSid: |
5 | # $Id: machine.sh,v 1.5 2013/02/09 12:57:35 obache Exp $ | | 5 | # $Id: machine.sh,v 1.6 2013/04/06 01:46:06 obache Exp $ |
6 | # | | 6 | # |
7 | # @(#) Copyright (c) 1994-2002 Simon J. Gerraty | | 7 | # @(#) Copyright (c) 1994-2002 Simon J. Gerraty |
8 | # | | 8 | # |
9 | # This file is provided in the hope that it will | | 9 | # This file is provided in the hope that it will |
10 | # be of use. There is absolutely NO WARRANTY. | | 10 | # be of use. There is absolutely NO WARRANTY. |
11 | # Permission to copy, redistribute or otherwise | | 11 | # Permission to copy, redistribute or otherwise |
12 | # use this file is hereby granted provided that | | 12 | # use this file is hereby granted provided that |
13 | # the above copyright notice and this notice are | | 13 | # the above copyright notice and this notice are |
14 | # left intact. | | 14 | # left intact. |
15 | # | | 15 | # |
16 | # Please send copies of changes and bug-fixes to: | | 16 | # Please send copies of changes and bug-fixes to: |
17 | # sjg@crufty.net | | 17 | # sjg@crufty.net |
18 | # | | 18 | # |
| @@ -72,27 +72,27 @@ Interix) | | | @@ -72,27 +72,27 @@ Interix) |
72 | MACHINE_ARCH=i386 | | 72 | MACHINE_ARCH=i386 |
73 | ;; | | 73 | ;; |
74 | UnixWare) | | 74 | UnixWare) |
75 | OSREL=`uname -v` | | 75 | OSREL=`uname -v` |
76 | OSMAJOR=`IFS=.; set $OSREL; echo $1` | | 76 | OSMAJOR=`IFS=.; set $OSREL; echo $1` |
77 | MACHINE_ARCH=`uname -m` | | 77 | MACHINE_ARCH=`uname -m` |
78 | ;; | | 78 | ;; |
79 | Linux) | | 79 | Linux) |
80 | case "$machine" in | | 80 | case "$machine" in |
81 | i?86) MACHINE_ARCH=i386;;# does anyone really care about 686 vs 586? | | 81 | i?86) MACHINE_ARCH=i386;;# does anyone really care about 686 vs 586? |
82 | esac | | 82 | esac |
83 | ;; | | 83 | ;; |
84 | CYGWIN_*) | | 84 | CYGWIN_*) |
85 | OS=CYGWIN | | 85 | OS=Cygwin |
86 | MACHINE=i386 | | 86 | MACHINE=i386 |
87 | MACHINE_ARCH=i386 | | 87 | MACHINE_ARCH=i386 |
88 | ;; | | 88 | ;; |
89 | esac | | 89 | esac |
90 | | | 90 | |
91 | MACHINE=${MACHINE:-$OS$OSMAJOR} | | 91 | MACHINE=${MACHINE:-$OS$OSMAJOR} |
92 | MACHINE_ARCH=${MACHINE_ARCH:-$machine} | | 92 | MACHINE_ARCH=${MACHINE_ARCH:-$machine} |
93 | | | 93 | |
94 | ( | | 94 | ( |
95 | case "$0" in | | 95 | case "$0" in |
96 | arch*) echo $MACHINE_ARCH;; | | 96 | arch*) echo $MACHINE_ARCH;; |
97 | *) | | 97 | *) |
98 | case "$1" in | | 98 | case "$1" in |