#!/bin/bash
# determine version.

OSXVer=`sw_vers -productVersion`

# EAGLE requires at least OSX 10.8.

if [[ $OSXVer =~ (.*)\.(.*)\. ]]; then
   Major=${BASH_REMATCH[1]}
   Minor=${BASH_REMATCH[2]}
   if [[ $Major -lt 10 ]]; then
      exit 112
   fi
   if [[ $Major -gt 10 ]]; then
      exit 0
   fi
   if [[ $Minor -lt 8 ]]; then
      exit 112
   fi
fi

#Check for architecture. Something like
#DarwinArch=`uname -m`
#
#if [[ $1  =~ (-mac64-) ]]; then
#   if [[ $DarwinArch eq "i386" ]]; then
#      exit 113
#   fi
#fi

exit 0
