Skip to content
This repository has been archived by the owner on Mar 26, 2023. It is now read-only.

Commit

Permalink
formating + improve the platform check
Browse files Browse the repository at this point in the history
  • Loading branch information
mpapis committed Dec 13, 2012
1 parent 8effb8f commit 86c98b8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions validate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
# 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"
[[ $PLATFORM == "Darwin-x86_64" ]] && PLATFORM="Darwin-i386"

# Check we're on a suitable 64-bit machine
case "$PLATFORM" in
Darwin-i386)
Darwin-i386)
OSVERSION="`sw_vers -productVersion`"
MAJOR="`echo $OSVERSION | cut -f1 -d.`"
MINOR="`echo $OSVERSION | cut -f2 -d.`"
Expand All @@ -36,13 +36,13 @@ case "$PLATFORM" in
exit 1
fi
;;
Linux-x86_64)
Linux-x86_64)
# Linux looks OK
;;
SunOS-i86pc)
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
Expand Down

0 comments on commit 86c98b8

Please sign in to comment.