This repository was archived by the owner on Mar 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathvalidate.sh
More file actions
executable file
·50 lines (47 loc) · 1.41 KB
/
validate.sh
File metadata and controls
executable file
·50 lines (47 loc) · 1.41 KB
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
#! /bin/bash
#=========================================================================
# Copyright (C) GemStone Systems, Inc. 2010.
#
# Name - install.sh
#
# Purpose - Make sure system can run MagLev.
#
# $Id:$
#
# Description:
# Verify machine is capable of running MagLev 64-bit
#
# Actions:
# Verify machine is capable of running MagLev 64-bit
#=========================================================================
# Detect operating system
PLATFORM="`uname -sm | tr ' ' '-'`"
# Macs with Core i7 use the same software as older Macs
[[ $PLATFORM == "Darwin-x86_64" ]] && PLATFORM="Darwin-i386"
# Check we're on a suitable 64-bit machine
case "$PLATFORM" in
Darwin-i386)
OSVERSION="`sw_vers -productVersion`"
MAJOR="`echo $OSVERSION | cut -f1 -d.`"
MINOR="`echo $OSVERSION | cut -f2 -d.`"
CPU_TYPE="`uname -p`"
CPU_CAPABLE="`sysctl hw.cpu64bit_capable | cut -f2 -d' '`"
#
# Check the CPU and Mac OS X profile.
if [[ $CPU_TYPE != "i386" || $CPU_CAPABLE -ne 1 || $MAJOR -lt 10 || $MINOR -lt 5 ]] ; then
echo "[Error] This script requires Mac OS X 10.5 or later on a 64-bit Intel CPU."
exit 1
fi
;;
Linux-x86_64)
# Linux looks OK
;;
SunOS-i86pc)
# Solaris X86 looks OK
;;
*)
echo "[Error] This script only works on a 64-bit Linux, Mac OS X, or Solaris-x86 machine"
echo "The result from \"uname -sm\" is \"`uname -sm`\""
exit 1
;;
esac