author  wenzelm 
Thu, 12 Oct 2006 14:07:48 +0200  
changeset 20991  bb6f570512b5 
parent 16994  a69d0496a724 
child 21279  2cb5f1621bcf 
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 
;; 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
wenzelm
parents:
diff
changeset

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

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

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

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

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

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

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

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

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

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

31 
PLATFORM=ppclinux 
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 
esac 
a69d0496a724
determine Poly/ML's idea of current hardware and operating system type;
wenzelm
parents:
diff
changeset

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

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

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

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

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

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

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

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

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

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

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

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

46 
;; 
20991  47 
i?86) 
48 
PLATFORM=x86darwin 

49 
;; 

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

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

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

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

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

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

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

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

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

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

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

60 

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

61 
echo "$PLATFORM" 