aboutsummaryrefslogtreecommitdiffstats
path: root/deskutils/nag/pkg-deinstall
diff options
context:
space:
mode:
authorijliao <ijliao@FreeBSD.org>2003-01-04 04:08:49 +0800
committerijliao <ijliao@FreeBSD.org>2003-01-04 04:08:49 +0800
commite8d1eec3b17bbf1f749c461ecbe09717f3d7420a (patch)
treef1f856a7cdc00b6754ff173076fae0a6c444b4c3 /deskutils/nag/pkg-deinstall
parent360ec9fff285650736c144236802ca30257a7d5f (diff)
downloadfreebsd-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-deinstall27
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