diff options
author | jlam <jlam> | 2000-12-06 07:55:14 +0000 |
---|---|---|
committer | jlam <jlam> | 2000-12-06 07:55:14 +0000 |
commit | 286b4e4250a65a97bdec1f66ca99857cdbd3a093 (patch) | |
tree | 601eb4a26d55b3c978506be04d02d93e5c1ce5f1 /www/surfraw | |
parent | 5b1651979e99e9bc625753e971fc692d2ea77d28 (diff) | |
download | pkgsrc-286b4e4250a65a97bdec1f66ca99857cdbd3a093.tar.gz |
Make the DEINSTALL/INSTALL script logic to handle configuration files
match the one for security/sudo.
Diffstat (limited to 'www/surfraw')
-rw-r--r-- | www/surfraw/pkg/DEINSTALL | 7 | ||||
-rw-r--r-- | www/surfraw/pkg/INSTALL | 6 |
2 files changed, 8 insertions, 5 deletions
diff --git a/www/surfraw/pkg/DEINSTALL b/www/surfraw/pkg/DEINSTALL index 37485383cea..c0a16db1c8c 100644 --- a/www/surfraw/pkg/DEINSTALL +++ b/www/surfraw/pkg/DEINSTALL @@ -1,10 +1,11 @@ #!/bin/sh # -# $NetBSD: DEINSTALL,v 1.1 2000/10/31 13:48:39 jlam Exp $ +# $NetBSD: DEINSTALL,v 1.2 2000/12/06 07:55:14 jlam Exp $ PKGNAME=$1 STAGE=$2 +SAMPLECONFDIR=${PKG_PREFIX}/etc CONFDIR=${PKG_PREFIX}/etc CONFFILES="surfraw.conf" @@ -16,14 +17,14 @@ DEINSTALL) for file in ${CONFFILES} do FILE=${CONFDIR}/${file} - if diff -q ${FILE} ${FILE}.dist >/dev/null + SAMPLEFILE=${SAMPLECONFDIR}/${file}.dist + if diff -q ${FILE} ${SAMPLEFILE} >/dev/null then rm -f ${FILE} fi done ;; POST-DEINSTALL) - CONFDIR=${PKG_PREFIX}/etc modified_files='' for file in ${CONFFILES} do diff --git a/www/surfraw/pkg/INSTALL b/www/surfraw/pkg/INSTALL index 299722508af..a7784e6961f 100644 --- a/www/surfraw/pkg/INSTALL +++ b/www/surfraw/pkg/INSTALL @@ -1,10 +1,11 @@ #! /bin/sh # -# $NetBSD: INSTALL,v 1.1 2000/10/31 13:48:39 jlam Exp $ +# $NetBSD: INSTALL,v 1.2 2000/12/06 07:55:14 jlam Exp $ PKGNAME=$1 STAGE=$2 +SAMPLECONFDIR=${PKG_PREFIX}/etc CONFDIR=${PKG_PREFIX}/etc CONFFILES="surfraw.conf" @@ -17,12 +18,13 @@ POST-INSTALL) for file in ${CONFFILES} do FILE=${CONFDIR}/${file} + SAMPLEFILE=${SAMPLECONFDIR}/${file}.dist if [ -f ${FILE} ] then echo " ${FILE} already exists" else echo " ${FILE}" - cp ${FILE}.dist ${FILE} + cp ${SAMPLEFILE} ${FILE} chmod 644 ${FILE} fi done |