diff options
author | jlam <jlam@pkgsrc.org> | 2000-12-06 07:55:14 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2000-12-06 07:55:14 +0000 |
commit | 3e27aea52ca44408fa75762e45f0fd12b09a2892 (patch) | |
tree | 601eb4a26d55b3c978506be04d02d93e5c1ce5f1 /www/surfraw | |
parent | 3668b203677572f18e037e92322534222946cd87 (diff) | |
download | pkgsrc-3e27aea52ca44408fa75762e45f0fd12b09a2892.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 |