source: trunk/base/macosx-prereqs.sh @ 6505

Last change on this file since 6505 was 6505, checked in by jkh, 16 years ago

Helper script to detect whether we have the right packages installed on
MacOSX. Supports the notion of "needed" and "wanted" scripts, the latter not
causing an error but generating an install-time hint that a wanted package
might be something one should install.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 517 bytes
Line 
1#!/bin/sh
2#
3# Check for prerequisite packages on MacOSX.
4
5RVAL=0
6R_DIR=/Library/Receipts
7NEED="BSD BSDSDK DeveloperTools"
8WANT="X11User X11SDK"
9
10for i in $NEED; do
11        if [ ! -d "${R_DIR}/${i}.pkg" ]; then
12                echo "Error: Missing Pkg: You need to install the ${i} package before you can install darwinports."
13                RVAL=1
14        fi
15done
16
17for i in $WANT; do
18        if [ ! -d "${R_DIR}/${i}.pkg" ]; then
19                echo "Warning: You may wish to install the ${i} package to have the best possible experience with darwinports."
20        fi
21done
22
23exit $RVAL
Note: See TracBrowser for help on using the repository browser.