58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
+
|
Linux)
GLIBCVERS=$(strings /lib/libc.so.6 | grep '^GLIBC_[0-9][0-9]*\.[0-9]*' | cut -f 2- -d _ | cut -f 1-2 -d . | sed 's@\.@ @g' | sort -n +0 +1 | tail -1 | sed 's@ @\.@g')
case "${CPUPLAT}" in
i?86)
CPUPLAT="ix86"
;;
sun4?)
sun4m)
CPUPLAT="sparc"
;;
esac
echo "linux-glibc${GLIBCVERS}-${CPUPLAT}"
;;
SunOS)
SUNMAJVER=$(uname -r | cut -f 1 -d .)
SUNMINVER=$(uname -r | cut -f 2 -d .)
SOLVER="$[${SUNMAJVER} - 3].${SUNMINVER}"
if [ -z "${CPUPLAT}" ]; then
echo 'Unable to determine platform' >&2
case "`uname -m`" in
sun4?)
CPUPLAT="sparc"
;;
*)
CPUPLAT="ix86"
;;
esac
exit 1
fi
echo "solaris${SOLVER}-${CPUPLAT}"
;;
HP-UX)
echo "hpux-${CPUPLAT}"
;;
*)
if [ -z "${CPUPLAT}" ]; then
CPUPLAT="`uname -m | dd conv=lcase 2>/dev/null`"
fi
echo "`uname -s | dd conv=lcase 2>/dev/null`-`uname -m | dd conv=lcase 2>/dev/null`"
echo "`uname -s | dd conv=lcase 2>/dev/null`-${CPUPLAT}"
;;
esac
|