Revision 10832,
2.5 KB
checked in by brlewis, 27 years ago
(diff) |
This commit was generated by cvs2svn to compensate for changes in r10831,
which included commits to RCS files with non-trunk default branches.
|
-
Property svn:executable set to
*
|
Rev | Line | |
---|
[10831] | 1 | #! /bin/sh |
---|
| 2 | |
---|
| 3 | if [ -f /bin/uname -o -f /usr/bin/uname ]; then |
---|
| 4 | set `uname -a | tr '[A-Z]' '[a-z]'` |
---|
| 5 | # set `cat test | tr '[A-Z]' '[a-z]'` |
---|
| 6 | case "$1" in |
---|
| 7 | convexos) case "$4" in |
---|
| 8 | 10.*) guess="convexos10" ;; |
---|
| 9 | esac |
---|
| 10 | ;; |
---|
| 11 | aix) case "$4" in |
---|
| 12 | 3) case "$3" in |
---|
| 13 | 1) guess="aix3.1" ;; |
---|
| 14 | 2) guess="aix3.2" ;; |
---|
| 15 | esac |
---|
| 16 | ;; |
---|
| 17 | esac |
---|
| 18 | ;; |
---|
| 19 | sinix-m) |
---|
| 20 | guess=sinix-m |
---|
| 21 | ;; |
---|
| 22 | sunos|solaris) |
---|
| 23 | case "$3" in |
---|
| 24 | 4.1*) guess="sunos4" ;; |
---|
| 25 | 5.1) guess="sunos5.1" ;; |
---|
| 26 | 5.2) guess="sunos5.2" ;; |
---|
| 27 | 5.3) guess="sunos5.3" ;; |
---|
| 28 | 5.*) guess="sunos5.4" ;; |
---|
| 29 | esac |
---|
| 30 | ;; |
---|
| 31 | irix) case "$3" in |
---|
| 32 | 4.*) guess="irix4" ;; |
---|
| 33 | 5.*) guess="irix5" ;; |
---|
| 34 | esac |
---|
| 35 | ;; |
---|
| 36 | irix64) case "$3" in |
---|
| 37 | 6.*) guess="irix6" ;; |
---|
| 38 | esac |
---|
| 39 | ;; |
---|
| 40 | "a/ux") case "$3" in |
---|
| 41 | 2.*) guess="aux2" ;; |
---|
| 42 | 3.*) guess="aux3" ;; |
---|
| 43 | esac |
---|
| 44 | ;; |
---|
| 45 | ultrix) |
---|
| 46 | guess="ultrix" |
---|
| 47 | ;; |
---|
| 48 | hp-ux) case "$3" in |
---|
| 49 | *.10.*) guess="hpux10" ;; |
---|
| 50 | *.09.03) case "$5" in |
---|
| 51 | 9000/3*) guess="hpux-adj" ;; |
---|
| 52 | *) guess="hpux" ;; |
---|
| 53 | esac ;; |
---|
| 54 | *) guess="hpux" ;; |
---|
| 55 | esac |
---|
| 56 | ;; |
---|
| 57 | linux) guess="linux" ;; |
---|
| 58 | |
---|
| 59 | osf1) case "$5" in |
---|
| 60 | alpha) guess="decosf1" ;; |
---|
| 61 | esac |
---|
| 62 | ;; |
---|
| 63 | "bsd/386"|"bsd/os") |
---|
| 64 | guess="bsdi" |
---|
| 65 | ;; |
---|
| 66 | "freebsd") |
---|
| 67 | guess="freebsd" |
---|
| 68 | case "$3" in |
---|
| 69 | 2.*) guess="freebsd2" ;; |
---|
| 70 | *) guess="freebsd" ;; |
---|
| 71 | esac |
---|
| 72 | ;; |
---|
| 73 | "netbsd") |
---|
| 74 | guess="netbsd" |
---|
| 75 | ;; |
---|
| 76 | "4.4bsd") |
---|
| 77 | guess="4.4bsd" |
---|
| 78 | ;; |
---|
| 79 | "unix_system_v") |
---|
| 80 | case "$7" in |
---|
| 81 | "uxp/v") guess="uxp-v" ;; |
---|
| 82 | esac |
---|
| 83 | ;; |
---|
| 84 | # now the fun starts - there are vendors that |
---|
| 85 | # do not really identify their OS in uname. |
---|
| 86 | # Fine - now I look at our version and hope |
---|
| 87 | # that nobody else had this marvellous idea. |
---|
| 88 | # I am not willing to mention the vendor explicitly |
---|
| 89 | *) # Great ! - We are dealing with an industry standard ! |
---|
| 90 | if [ -f /unix ]; then |
---|
| 91 | # |
---|
| 92 | # looks like this thing has the license |
---|
| 93 | # to call itself Unix |
---|
| 94 | # |
---|
| 95 | case "$3" in |
---|
| 96 | 3.2.*) |
---|
| 97 | case "$4" in |
---|
| 98 | v*) |
---|
| 99 | (i386) >/dev/null 2>&1 && [ -f /usr/lib/libseq.a ] && guess=ptx;; |
---|
| 100 | esac |
---|
| 101 | esac |
---|
| 102 | fi |
---|
| 103 | ;; |
---|
| 104 | esac |
---|
| 105 | fi |
---|
| 106 | |
---|
| 107 | if [ "0$guess" != "0" ]; then |
---|
| 108 | echo $guess |
---|
| 109 | exit 0 |
---|
| 110 | fi |
---|
| 111 | |
---|
| 112 | if [ -f /bin/machine ]; then |
---|
| 113 | echo `/bin/machine` |
---|
| 114 | exit 0 |
---|
| 115 | fi |
---|
| 116 | |
---|
| 117 | if [ -f /usr/convex/vers ]; then |
---|
| 118 | set `/usr/convex/vers /vmunix` |
---|
| 119 | case "$2" in |
---|
| 120 | 9.0) echo "convexos9" |
---|
| 121 | exit 0 ;; |
---|
| 122 | esac |
---|
| 123 | fi |
---|
| 124 | |
---|
| 125 | if [ -d /usr/lib/NextStep ]; then |
---|
| 126 | echo next |
---|
| 127 | exit 0 |
---|
| 128 | fi |
---|
| 129 | |
---|
| 130 | if [ -f /netbsd ]; then |
---|
| 131 | echo netbsd |
---|
| 132 | exit 0 |
---|
| 133 | fi |
---|
| 134 | |
---|
| 135 | if [ -f /lib/clib -a -f /lib/libc ]; then |
---|
| 136 | echo domainos |
---|
| 137 | exit 0 |
---|
| 138 | fi |
---|
| 139 | |
---|
| 140 | case "$guess" in |
---|
| 141 | '') guess="none" |
---|
| 142 | esac |
---|
| 143 | |
---|
| 144 | echo $guess |
---|
Note: See
TracBrowser
for help on using the repository browser.