forked from avr-aics-riken/LPTlib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lpt-uname
executable file
·56 lines (50 loc) · 1.23 KB
/
lpt-uname
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/sh
##############################################################################
#
# LPTlib - Lagrangian Particle Tracking library
#
# Copyright (c) 2012-2014 Advanced Institute for Computational Science, RIKEN.
# All right reserved.
#
##############################################################################
# lpt-uname : This script examines the kind of OS
# for Linux
if test `uname` = "Linux" ; then
if test `uname -m` = "ia64" ; then
echo IA64_Linux
elif test `uname -m` = "x86_64" ; then
echo Intel64_Linux
else
echo IA32_Linux
fi
exit 0
fi
# for MacOSX
if test `uname` = "Darwin" ; then
if test `uname -r | cut -b 1` = "1" ; then
if test `uname -r | cut -b 2` = "0" ; then
echo Snow_Leopard
elif test `uname -r | cut -b 2` = "1" ; then
echo Lion
elif test `uname -r | cut -b 2` = "2" ; then
echo Mountain_Lion
fi
elif test `uname -r | cut -b 1` = "9" ; then
echo Leopard
elif test `uname -r | cut -b 1` = "8" ; then
if test `uname -p` = "i386" ; then
echo Tiger_Intel
else
echo Tiger_PPC
fi
elif test `uname -r | cut -b 1` = "7" ; then
echo Panther
else
echo OS_UNKOWN
exit 1
fi
exit 0
fi
# OS Unkown
echo OS_UNKOWN
exit 1