head	1.2;
access;
symbols
	RELEASE_7_3_0:1.1
	RELEASE_8_0_0:1.1
	RELEASE_7_2_0:1.1
	RELEASE_7_1_0:1.1
	RELEASE_6_4_0:1.1
	RELEASE_5_EOL:1.1
	RELEASE_7_0_0:1.1
	RELEASE_6_3_0:1.1
	PRE_XORG_7:1.1
	RELEASE_4_EOL:1.1
	RELEASE_6_2_0:1.1
	RELEASE_6_1_0:1.1
	RELEASE_5_5_0:1.1
	RELEASE_6_0_0:1.1
	RELEASE_5_4_0:1.1
	RELEASE_4_11_0:1.1
	RELEASE_5_3_0:1.1
	RELEASE_4_10_0:1.1
	RELEASE_5_2_1:1.1
	RELEASE_5_2_0:1.1
	RELEASE_4_9_0:1.1
	RELEASE_5_1_0:1.1
	RELEASE_4_8_0:1.1
	RELEASE_5_0_0:1.1
	RELEASE_4_7_0:1.1
	RELEASE_4_6_2:1.1
	RELEASE_4_6_1:1.1
	RELEASE_4_6_0:1.1
	RELEASE_5_0_DP1:1.1
	RELEASE_4_5_0:1.1
	RELEASE_4_4_0:1.1
	RELEASE_4_3_0:1.1
	RELEASE_4_2_0:1.1
	RELEASE_4_1_1:1.1;
locks; strict;
comment	@# @;


1.2
date	2010.06.24.11.24.43;	author jadawin;	state dead;
branches;
next	1.1;

1.1
date	2000.09.17.19.05.58;	author ade;	state Exp;
branches;
next	;


desc
@@


1.2
log
@- Update to 2.2.7

PR:		ports/146977
Submitted by:	Anonymous <swell.k _AT_ gmail.com>
Feature safe:	yes
@
text
@#!/bin/sh
#
# Pre/post-installation setup of surfraw

# exit on errors, use a sane path and install prefix
#
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
CONFIG_FILE=${PREFIX}/etc/surfraw.conf
SAMPLE_CONFIG_DIR=${PREFIX}/share/examples/surfraw

# Function: tell the user what they need to do to use the port just installed
#
do_notice()
{
    echo
    echo "+---------------"
    echo "| The existing $1 configuration file, ${CONFIG_FILE},"
    echo "| has NOT been changed.  You may want to compare it to the"
    echo "| current sample files in ${SAMPLE_CONFIG_DIR}"
    echo "| and update your configuration as needed."
    echo "+---------------"
    echo
}

# Function: install configuration files
#
do_install()
{
    install -c -o root -g wheel ${SAMPLE_CONFIG_DIR}/surfraw.conf ${CONFIG_FILE}
    echo
    echo "+---------------"
    echo "| The $1 configuration file, ${CONFIG_FILE},"
    echo "| has been installed.  Please view this file and change"
    echo "| the configuration to meet your needs"
    echo "+---------------"
    echo
}

# Verify proper execution
#
if [ $# -ne 2 ]; then
    echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
    exit 1
fi

# Verify/process the command
#
case $2 in
    PRE-INSTALL)
	: nothing to pre-install for this port
	;;
    POST-INSTALL)
	if [ -f ${CONFIG_FILE} ]; then
	    do_notice "$1"
	else
	    do_install "$1"
	fi
	;;
    *)
	echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
	exit 1
	;;
esac

exit 0
@


1.1
log
@Update to version 1.0.1

PR:		21326
Submitted by:	maintainer
@
text
@@

