| author | schirmer | 
| Wed, 19 Dec 2007 16:32:14 +0100 | |
| changeset 25706 | 45d090186bbe | 
| parent 25348 | 510b46987886 | 
| child 29145 | b1c6f4563df7 | 
| permissions | -rwxr-xr-x | 
| 16994 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 1 | #!/usr/bin/env bash | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 2 | # | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 3 | # $Id$ | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 4 | # | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 5 | # polyml-platform --- determine Poly/ML's idea of current hardware and | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 6 | # operating system type | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 7 | # | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 8 | # NOTE: platform identifiers should be kept as generic as possible, | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 9 | # i.e. shared by compatible environments. | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 10 | |
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 11 | PLATFORM="unknown-platform" | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 12 | |
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 13 | case $(uname -s) in | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 14 | SunOS) | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 15 | case $(uname -r) in | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 16 | 5.*) | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 17 | case $(uname -p) in | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 18 | sparc) | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 19 | PLATFORM=sparc-solaris | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 20 | ;; | 
| 24474 | 21 | i?86) | 
| 22 | PLATFORM=x86-solaris | |
| 23 | ;; | |
| 16994 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 24 | esac | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 25 | ;; | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 26 | esac | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 27 | ;; | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 28 | Linux) | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 29 | case $(uname -m) in | 
| 25348 | 30 | i?86 | x86_64) | 
| 16994 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 31 | PLATFORM=x86-linux | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 32 | ;; | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 33 | Power* | power* | ppc) | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 34 | PLATFORM=ppc-linux | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 35 | ;; | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 36 | esac | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 37 | ;; | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 38 | FreeBSD|NetBSD) | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 39 | case $(uname -m) in | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 40 | i?86) | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 41 | PLATFORM=x86-bsd | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 42 | ;; | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 43 | esac | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 44 | ;; | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 45 | Darwin) | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 46 | case $(uname -m) in | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 47 | Power* | power* | ppc) | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 48 | PLATFORM=ppc-darwin | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 49 | ;; | 
| 20991 | 50 | i?86) | 
| 51 | PLATFORM=x86-darwin | |
| 52 | ;; | |
| 16994 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 53 | esac | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 54 | ;; | 
| 21279 | 55 | CYGWIN_NT*) | 
| 56 | case $(uname -m) in | |
| 57 | i?86) | |
| 58 | PLATFORM=x86-cygwin | |
| 59 | ;; | |
| 60 | esac | |
| 61 | ;; | |
| 16994 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 62 | Windows_NT) | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 63 | case $(uname -m) in | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 64 | ?86) | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 65 | PLATFORM=x86-win32 | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 66 | ;; | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 67 | esac | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 68 | ;; | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 69 | esac | 
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 70 | |
| 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
 wenzelm parents: diff
changeset | 71 | echo "$PLATFORM" |