diff options
author | ijliao <ijliao@FreeBSD.org> | 2003-01-04 04:08:49 +0800 |
---|---|---|
committer | ijliao <ijliao@FreeBSD.org> | 2003-01-04 04:08:49 +0800 |
commit | e8d1eec3b17bbf1f749c461ecbe09717f3d7420a (patch) | |
tree | f1f856a7cdc00b6754ff173076fae0a6c444b4c3 /deskutils/nag/pkg-deinstall | |
parent | 360ec9fff285650736c144236802ca30257a7d5f (diff) | |
download | freebsd-ports-gnome-e8d1eec3b17bbf1f749c461ecbe09717f3d7420a.tar.gz freebsd-ports-gnome-e8d1eec3b17bbf1f749c461ecbe09717f3d7420a.tar.zst freebsd-ports-gnome-e8d1eec3b17bbf1f749c461ecbe09717f3d7420a.zip |
upgrade to 1.1
PR: 46577
Submitted by: maintainer
Diffstat (limited to 'deskutils/nag/pkg-deinstall')
-rw-r--r-- | deskutils/nag/pkg-deinstall | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/deskutils/nag/pkg-deinstall b/deskutils/nag/pkg-deinstall new file mode 100644 index 000000000000..266600fc1a29 --- /dev/null +++ b/deskutils/nag/pkg-deinstall @@ -0,0 +1,27 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# Backup Nag config files, if needed. + +if [ x$2 != xDEINSTALL ]; then + exit +fi + +if [ -z "${PACKAGE_BUILDING}" ]; then + for cf in `ls ${PKG_PREFIX}/www/horde/nag/config/*php`; do + diff -bBqw $cf $cf.dist >/dev/null 2>&1 + case $? in + 0) # original config file, will be deleted by pkg-plist + ;; + 1) # config file has been updated, must be backuped + cp -p $cf $cf.previous + echo "===> Backing-up..." + echo "---> $cf has been saved ***" + echo "---> as $cf.previous ***" + ;; + *) # not found? + ;; + esac + done +fi |