author  wenzelm 
Wed, 29 Aug 2007 16:24:38 +0200  
changeset 24474  33da394f0888 
parent 21446  3d57db34633b 
child 25348  510b46987886 
permissions  rwxrxrx 
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 
# polymlplatform  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="unknownplatform" 
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=sparcsolaris 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
wenzelm
parents:
diff
changeset

20 
;; 
24474  21 
i?86) 
22 
PLATFORM=x86solaris 

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 
21446  30 
i?86) 
16994
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
wenzelm
parents:
diff
changeset

31 
PLATFORM=x86linux 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
wenzelm
parents:
diff
changeset

32 
;; 
21446  33 
x86_64) 
34 
PLATFORM=x86_64linux 

35 
;; 

16994
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
wenzelm
parents:
diff
changeset

36 
Power*  power*  ppc) 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
wenzelm
parents:
diff
changeset

37 
PLATFORM=ppclinux 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
wenzelm
parents:
diff
changeset

38 
;; 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
wenzelm
parents:
diff
changeset

39 
esac 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
wenzelm
parents:
diff
changeset

40 
;; 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
wenzelm
parents:
diff
changeset

41 
FreeBSDNetBSD) 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
wenzelm
parents:
diff
changeset

42 
case $(uname m) in 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
wenzelm
parents:
diff
changeset

43 
i?86) 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
wenzelm
parents:
diff
changeset

44 
PLATFORM=x86bsd 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
wenzelm
parents:
diff
changeset

45 
;; 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
wenzelm
parents:
diff
changeset

46 
esac 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
wenzelm
parents:
diff
changeset

47 
;; 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
wenzelm
parents:
diff
changeset

48 
Darwin) 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
wenzelm
parents:
diff
changeset

49 
case $(uname m) in 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
wenzelm
parents:
diff
changeset

50 
Power*  power*  ppc) 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
wenzelm
parents:
diff
changeset

51 
PLATFORM=ppcdarwin 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
wenzelm
parents:
diff
changeset

52 
;; 
20991  53 
i?86) 
54 
PLATFORM=x86darwin 

55 
;; 

16994
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
wenzelm
parents:
diff
changeset

56 
esac 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
wenzelm
parents:
diff
changeset

57 
;; 
21279  58 
CYGWIN_NT*) 
59 
case $(uname m) in 

60 
i?86) 

61 
PLATFORM=x86cygwin 

62 
;; 

63 
esac 

64 
;; 

16994
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
wenzelm
parents:
diff
changeset

65 
Windows_NT) 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
wenzelm
parents:
diff
changeset

66 
case $(uname m) in 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
wenzelm
parents:
diff
changeset

67 
?86) 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
wenzelm
parents:
diff
changeset

68 
PLATFORM=x86win32 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
wenzelm
parents:
diff
changeset

69 
;; 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
wenzelm
parents:
diff
changeset

70 
esac 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
wenzelm
parents:
diff
changeset

71 
;; 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
wenzelm
parents:
diff
changeset

72 
esac 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
wenzelm
parents:
diff
changeset

73 

a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
wenzelm
parents:
diff
changeset

74 
echo "$PLATFORM" 