#!/bin/bash

# InstallationCheck script for the MacTeX installer

# is our system pre 10.5?
if [[ `/usr/bin/uname -r | /usr/bin/cut -f 1 -d .` -lt 9 ]]; then
	exit 114 	# display string "18" from InstallationCheck.strings
fi

# was the BSD package installed?
if [[ ! -x /usr/bin/grep ]]; then
	exit 115  # display string "19" from InstallationCheck.strings
fi

# are there are least 3 gigs of free space on the hard disk?
if [[  `/bin/df -k / | grep % | awk '{ print $4 }' | sed 's/%//g' ` -lt 4000000 ]]; then
 	exit 116 # display string "20" from InstallationCheck.strings
fi

# does the source folder on the DVD exist?
if [[ ! -d /Volumes/TEXCOL2012/texlive ]]; then
  	exit 117 # display string "21" from InstallationCheck.strings
fi

exit 0


