#!/bin/sh # $OpenBSD: INSTALL,v 1.1 2004/06/15 18:32:22 sturm Exp $ PATH=/bin:/usr/bin:/sbin:/usr/sbin PREFIX=${PKG_PREFIX:-/usr/local} CRYPT=/crypt NULL=/null do_notice() { echo echo "+---------------" echo "| The existing directories $CRYPT and $NULL have" echo "| not been changed." echo "+---------------" } do_install() { if [ ! -d $CRYPT ]; then install -d -o root -g wheel -m 755 $CRYPT echo "==> Directory $CRYPT created." fi if [ ! -d $NULL ]; then install -d -o root -g wheel -m 0 $NULL echo "==> Directory $NULL created." fi } if [ $# -ne 2 ]; then echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2 exit 1 fi case $2 in PRE-INSTALL) : nothing to pre-install for this port ;; POST-INSTALL) if [ -d /crypt -a -d /null ]; then do_notice $1 else do_install $1 fi ;; *) echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2 exit 1 ;; esac exit 0