aboutsummaryrefslogtreecommitdiff
path: root/mail/horde-ingo/pkg-deinstall
diff options
context:
space:
mode:
authorThierry Thomas <thierry@FreeBSD.org>2004-12-26 10:23:36 +0000
committerThierry Thomas <thierry@FreeBSD.org>2004-12-26 10:23:36 +0000
commit4c395e97edebc723608cf203afa07bdbc8ba854d (patch)
tree98741ead587e990137e9ee7c9213d210e9b0f224 /mail/horde-ingo/pkg-deinstall
parentde68a058bfd96eec3e7101d045e39163958bbb96 (diff)
downloadports-4c395e97edebc723608cf203afa07bdbc8ba854d.tar.gz
ports-4c395e97edebc723608cf203afa07bdbc8ba854d.zip
Notes
Diffstat (limited to 'mail/horde-ingo/pkg-deinstall')
-rw-r--r--mail/horde-ingo/pkg-deinstall27
1 files changed, 27 insertions, 0 deletions
diff --git a/mail/horde-ingo/pkg-deinstall b/mail/horde-ingo/pkg-deinstall
new file mode 100644
index 000000000000..a3a597d448a6
--- /dev/null
+++ b/mail/horde-ingo/pkg-deinstall
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# Backup Ingo config files, if needed.
+
+if [ x$2 != xDEINSTALL ]; then
+ exit
+fi
+
+if [ -z "${PACKAGE_BUILDING}" ]; then
+ for cf in `ls ${PKG_PREFIX}/www/horde/ingo/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