diff options
author | zuntum <zuntum@pkgsrc.org> | 2001-11-01 02:15:23 +0000 |
---|---|---|
committer | zuntum <zuntum@pkgsrc.org> | 2001-11-01 02:15:23 +0000 |
commit | 431e7a7ddad1a9e4611e8e6d4b744301d3730458 (patch) | |
tree | f392f0f557931c9cf9a1ff512b5a4b44150c2ec3 /www/cvsweb/DEINSTALL | |
parent | c72c1cf5f95cbe537b005028f1743cddb16ef203 (diff) | |
download | pkgsrc-431e7a7ddad1a9e4611e8e6d4b744301d3730458.tar.gz |
Move pkg/ files into package's toplevel directory
Diffstat (limited to 'www/cvsweb/DEINSTALL')
-rw-r--r-- | www/cvsweb/DEINSTALL | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/www/cvsweb/DEINSTALL b/www/cvsweb/DEINSTALL new file mode 100644 index 00000000000..01803ad5a7e --- /dev/null +++ b/www/cvsweb/DEINSTALL @@ -0,0 +1,67 @@ +#!/bin/sh +# +# $NetBSD: DEINSTALL,v 1.1 2001/11/01 02:16:38 zuntum Exp $ + +PKGNAME=$1 +STAGE=$2 + +CAT="@CAT@" +CMP="@CMP@" +CP="@CP@" +RM="@RM@" + +SERVERROOT="@APACHE_SYSCONFDIR@" +SAMPLECONFDIR=${PKG_PREFIX}/share/examples/cvsweb +CONFDIR=${SERVERROOT} +CONFFILES="cvsweb.conf" + +case ${STAGE} in +DEINSTALL) + # Remove configuration files if they don't differ from the default + # config file. + # + for file in ${CONFFILES} + do + FILE=${CONFDIR}/${file} + SAMPLEFILE=${SAMPLECONFDIR}/${file}.default + if ${CMP} -s ${FILE} ${SAMPLEFILE} + then + ${RM} -f ${FILE} + fi + done + ;; + +POST-DEINSTALL) + modified_files='' + for file in ${CONFFILES} + do + FILE=${CONFDIR}/${file} + if [ -f ${FILE} ] + then + modified_files="${modified_files} ${FILE}" + fi + done + + if [ -n "${modified_files}" ] + then + ${CAT} << EOF +=========================================================================== +If you won't be using ${PKGNAME} any longer, you may want to remove: + +EOF + for file in ${modified_files} + do + echo " ${file}" + done + ${CAT} << EOF +=========================================================================== +EOF + fi + ;; + +*) + echo "Unexpected argument: ${STAGE}" + exit 1 + ;; +esac +exit 0 |