File: sys-arch

package info (click to toggle)
msql 2.0.3-5
  • links: PTS
  • area: non-free
  • in suites: hamm, slink
  • size: 3,596 kB
  • ctags: 2,483
  • sloc: ansic: 34,769; sh: 1,309; yacc: 1,084; perl: 328; makefile: 267
file content (52 lines) | stat: -rwxr-xr-x 818 bytes parent folder | download
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
#!/bin/sh

machine=`uname -m | tr "/" "_"`
os=`uname -s | tr "/" "_"`
rev=`uname -r | tr "/" "_"`

if test "$machine." = "."
then
	echo	1>&2
	echo	1>&2
	echo "You don't appear to have the uname command anywhere." 1>&2
	echo "Please describe your system (eg.  SunOS-4.1-sparc)" 1>&2
	read info
	echo	1>&2
	echo	1>&2
	echo $info
	exit
fi
	

if echo "$machine" | grep "^sun4" > /dev/null
then
	machine="Sparc"
fi


if echo "$os" | grep "^ULTRIX" > /dev/null
then
	os="Ultrix"
fi


if test "$os" = "SunOS"
then
	maj=`echo $rev | sed "s,^\([0-9]*\)\.\(.*\),\1,"`
	min=`echo $rev | sed "s,^\([0-9]*\)\.\(.*\),\2,"`
	if test $maj -gt 4
	then
		os="Solaris"
		rev="2.$min"
	fi
fi

if test "$os" = "AIX"
then
	machine="rs6000"
	maj=`uname -v`
	min=`uname -r`
	rev="$maj.$min"
fi

echo "${os}-${rev}-${machine}" | sed 's/ /_/g'