summaryrefslogtreecommitdiff
path: root/deskutils/horde-kronolith/files
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@FreeBSD.org>2006-04-15 16:11:25 +0000
committerMarc G. Fournier <scrappy@FreeBSD.org>2006-04-15 16:11:25 +0000
commit5a18218c206df07b4f892a79b071cc20062c8e02 (patch)
treea18a0d6b7d6c51a0bbd9e7ad983e7a925f913e63 /deskutils/horde-kronolith/files
parentAfter a recent discussion on freebsd-ports, I have modified the Horde ports, ... (diff)
After a recent discussion on freebsd-ports, I have modified the Horde ports, so that
they now do not overwrite existing configuration files. Rather than backing up the old ones and allowing the user to merge the files by hand, config files are left untouched. Submitted by: Shaun Amott <shaun@inerd.com>
Notes
Notes: svn path=/head/; revision=159610
Diffstat (limited to 'deskutils/horde-kronolith/files')
-rw-r--r--deskutils/horde-kronolith/files/pkg-deinstall.in9
-rw-r--r--deskutils/horde-kronolith/files/pkg-install.in23
2 files changed, 26 insertions, 6 deletions
diff --git a/deskutils/horde-kronolith/files/pkg-deinstall.in b/deskutils/horde-kronolith/files/pkg-deinstall.in
index 896c740dd4da..97d0a7cca145 100644
--- a/deskutils/horde-kronolith/files/pkg-deinstall.in
+++ b/deskutils/horde-kronolith/files/pkg-deinstall.in
@@ -12,13 +12,10 @@ if [ -z "${PACKAGE_BUILDING}" ]; then
for cf in `ls %%KRONOLITHDIR%%/config/*php`; do
diff -bBqw $cf $cf.dist >/dev/null 2>&1
case $? in
- 0) # original config file, will be deleted by pkg-plist
+ 0) # original config file, delete it
+ rm -f $cf
;;
- 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 ***"
+ 1) # config file has been updated, leave it alone
;;
*) # not found?
;;
diff --git a/deskutils/horde-kronolith/files/pkg-install.in b/deskutils/horde-kronolith/files/pkg-install.in
new file mode 100644
index 000000000000..84722b6dc70a
--- /dev/null
+++ b/deskutils/horde-kronolith/files/pkg-install.in
@@ -0,0 +1,23 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+PATH=/usr/sbin:/usr/bin:/bin ; export PATH
+
+case $2 in
+ PRE-INSTALL)
+ ;;
+
+ POST-INSTALL)
+ if [ -z "${PACKAGE_BUILDING}" ]; then
+ # Copy over sample config files unless they already exist
+
+ for cf in `ls %%KRONOLITHDIR%%/config/*.dist | sed -e 's/\.dist//g'`; do
+ if [ ! -f $cf ]; then
+ cp -p $cf.dist $cf
+ fi
+ done
+ fi
+ ;;
+esac