"SfR Fresh" - the SfR Freeware/Shareware Archive

Member "libdap-3.8.2/OSX_Resources/InstallationCheck" of archive libdap-3.8.2.tar.gz:


As a special service "SfR Fresh" has tried to format the requested source page into HTML format using source code syntax highlighting with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. That can be also achieved for any archive member file by clicking within an archive contents listing on the first character of the file(path) respectively on the according byte size field.
    1 #!/bin/sh
    2 #
    3 # Check the architecture
    4 
    5 # use "i386" or "ppc.*" - nake sure to use a regex for PPC!
    6 
    7 architecture="ppc.*" 
    8 
    9 
   10 if arch | grep -v "$architecture"
   11 then
   12     if arch | grep "i386"
   13     then
   14 	# You have an intel mac error message
   15 	exit 115
   16     else
   17 	# PowerPC message
   18 	exit 116
   19     fi
   20 fi
   21 
   22 # Check to make sure the computer is running 10.3 or later.
   23 
   24 version=`uname -a | sed 's/.*Darwin Kernel Version \([0-9.]*\):.*/\1/'`
   25 major=`echo $version | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
   26 minor=`echo $version | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
   27 
   28 if test $major -lt 7 -o $major -eq 7 -a $minor -lt 9
   29 then
   30     # Warn and display message 16 (the string displayed will be read from 
   31     # InstallationCheck.strings using the exit code minus 32 to select the
   32     # specific string).
   33     exit 48
   34 fi
   35 
   36 # we need libcurl 7.10.6 according to configure.ac
   37 version=`curl-config --version | sed 's/libcurl \([0-9.]*\).*/\1/'`
   38 major=`echo $version | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
   39 minor=`echo $version | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
   40 
   41 if test $major -lt 7 -o $major -eq 7 -a $minor -lt 10
   42 then
   43     # Fail and display message 17 (exit code - 96)
   44     exit 113
   45 fi
   46 
   47 # we need libxml2 2.6.16 according to configure.ac
   48 version=`xml2-config --version | sed 's/\([0-9.]*\).*/\1/'`
   49 major=`echo $version | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
   50 minor=`echo $version | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
   51 
   52 if test $major -lt 2 -o $major -eq 2 -a $minor -lt 6
   53 then
   54     # Fail and display message 81
   55     exit 114
   56 fi
   57 
   58 exit 0