aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorscrappy <scrappy@FreeBSD.org>2006-04-16 00:23:50 +0800
committerscrappy <scrappy@FreeBSD.org>2006-04-16 00:23:50 +0800
commit4ef678cedbb4c3da06124e9d9a32e2c1e2374fa5 (patch)
treeedbfa1dc81432dd1fbd6551821fba5553f2798c1 /devel
parent2899b20061336fe346fe998f1cbe0d0389ff3022 (diff)
downloadfreebsd-ports-gnome-4ef678cedbb4c3da06124e9d9a32e2c1e2374fa5.tar.gz
freebsd-ports-gnome-4ef678cedbb4c3da06124e9d9a32e2c1e2374fa5.tar.zst
freebsd-ports-gnome-4ef678cedbb4c3da06124e9d9a32e2c1e2374fa5.zip
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>
Diffstat (limited to 'devel')
-rw-r--r--devel/chora/files/pkg-deinstall.in9
-rw-r--r--devel/chora/files/pkg-install.in23
-rw-r--r--devel/horde-chora/files/pkg-deinstall.in9
-rw-r--r--devel/horde-chora/files/pkg-install.in23
4 files changed, 52 insertions, 12 deletions
diff --git a/devel/chora/files/pkg-deinstall.in b/devel/chora/files/pkg-deinstall.in
index 0ef032fe5654..ca19b4bfa602 100644
--- a/devel/chora/files/pkg-deinstall.in
+++ b/devel/chora/files/pkg-deinstall.in
@@ -12,13 +12,10 @@ if [ -z "${PACKAGE_BUILDING}" ]; then
for cf in `ls %%CHORADIR%%/config/*php %%CHORADIR%%/config/*txt`; 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/devel/chora/files/pkg-install.in b/devel/chora/files/pkg-install.in
new file mode 100644
index 000000000000..4c605270649a
--- /dev/null
+++ b/devel/chora/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 %%CHORADIR%%/config/*.dist | sed -e 's/\.dist//g'`; do
+ if [ ! -f $cf ]; then
+ cp -p $cf.dist $cf
+ fi
+ done
+ fi
+ ;;
+esac
diff --git a/devel/horde-chora/files/pkg-deinstall.in b/devel/horde-chora/files/pkg-deinstall.in
index 0ef032fe5654..ca19b4bfa602 100644
--- a/devel/horde-chora/files/pkg-deinstall.in
+++ b/devel/horde-chora/files/pkg-deinstall.in
@@ -12,13 +12,10 @@ if [ -z "${PACKAGE_BUILDING}" ]; then
for cf in `ls %%CHORADIR%%/config/*php %%CHORADIR%%/config/*txt`; 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/devel/horde-chora/files/pkg-install.in b/devel/horde-chora/files/pkg-install.in
new file mode 100644
index 000000000000..4c605270649a
--- /dev/null
+++ b/devel/horde-chora/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 %%CHORADIR%%/config/*.dist | sed -e 's/\.dist//g'`; do
+ if [ ! -f $cf ]; then
+ cp -p $cf.dist $cf
+ fi
+ done
+ fi
+ ;;
+esac