From: Andre P. <at...@us...> - 2005-07-30 11:52:07
|
Update of /cvsroot/hoc/hoc/installer-package/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9745 Added Files: InstallationCheck InstallationCheck.strings Log Message: Added check to the Mac OS X .pkg, to ensure that Wolfgang's GHC 6.4 is installed --- NEW FILE: InstallationCheck.strings --- "16" = "This HOC package only works with Wolfgang Thaller's GHC 6.4 package. Please download and install it from <http://www.haskell.org/ghc/dist/6.4/MacOSX/GHC-6.4.pkg.zip>."; "17" = "You appear to have installed Wolfgang Thaller's GHC 6.4 package, but the GHC version in /usr/local/bin/ is not version 6.4. Please re-install the GHC 6.4 package from <http://www.haskell.org/ghc/dist/6.4/MacOSX/GHC-6.4.pkg.zip>."; --- NEW FILE: InstallationCheck --- #!/bin/bash if grep -q \ wolfgang \ /Library/Receipts/GHC-6.4.pkg/Contents/Resources/ReadMe.rtfd/TXT.rtf then # user has the receipt for the installation; to be sure, verify that we # have ghc 6.4 ghc_version=`/usr/local/bin/ghc --version` case "$ghc_version" in "The Glorious Glasgow Haskell Compilation System, version 6.4") # success exit_code=0 ;; *) # some other version? exit_code=$(( (1 << 5) | (1 << 6) | 17 )) ;; esac else # user doesn't have wolfgang's GHC 6.4 package installed exit_code=$(( (1 << 5) | (1 << 6) | 16 )) fi exit $exit_code |