X-Git-Url: http://www.privoxy.org/gitweb/installation.html?a=blobdiff_plain;f=common.sh;h=e6b615fdd53f4d0c02b6a263010e6f8ad2fe38c1;hb=65c84efc643600727c50ea82d773400e8876fd9b;hp=320ac176777802c60470744240af2efe5b963e93;hpb=a2d32da683d8ebfa1bc1cb709a625bebfd9099b6;p=OSXPackageBuilder.git diff --git a/common.sh b/common.sh index 320ac17..e6b615f 100755 --- a/common.sh +++ b/common.sh @@ -28,7 +28,8 @@ # USA # # Modification : If you modify this file please consider whether your -# changes ought to be passed back to the macsetup module. +# changes ought to be passed back to the OSXPackageBuilder +# module. # #======================================== @@ -124,8 +125,8 @@ darwin_major_rel_num="`/usr/bin/uname -r | /usr/bin/sed 's/\..*//'`" # check the release number # case "${darwin_major_rel_num}" in - # Mac OS X 10.7, 10.6, 10.5 - 11|10|9) + # Mac OS X 10.5 or higher + 9|1*) GNAME="`/usr/bin/dscl /Local/Default -list /groups | /usr/bin/grep -E '^(_)?privoxy?'`" UNAME="`/usr/bin/dscl /Local/Default -list /users | /usr/bin/grep -E '^(_)?privoxy?'`" SCRIPT="privoxy-create-dscl.sh" @@ -147,3 +148,31 @@ case "${darwin_major_rel_num}" in ;; esac +# +# identify the directory containing Privoxy's source +# +cd .. +DIRS_FOUND=0 +SOURCE_DIR="" +if [ -d dist ]; then + DIRS_FOUND=1 +fi +if [ -d current ]; then + DIRS_FOUND=$(( DIRS_FOUND + 10 )) +fi +case "${DIRS_FOUND}" in + # only 'current' found + 10) + SOURCE_DIR="current" + ;; + # only 'dist' found + 1) + SOURCE_DIR="dist" + ;; + # either both or neither found + 11|0) + read -p 'Could not select the Privoxy source directory. Please supply the directory name: ' SOURCE_DIR + ;; +esac +cd OSXPackageBuilder +echo "Using ../${SOURCE_DIR} as location of Privoxy source" \ No newline at end of file