diff options
author | Edwin Groothuis <edwin@FreeBSD.org> | 2003-01-16 12:23:15 +0000 |
---|---|---|
committer | Edwin Groothuis <edwin@FreeBSD.org> | 2003-01-16 12:23:15 +0000 |
commit | 904b85e26155d75cdada9e8dd47ea495706e1592 (patch) | |
tree | 38d0a2a2f99b8c4542011647887f194986da331c /devel/horde-chora/pkg-deinstall | |
parent | 3b769f462ea31be5386049ea55e91c69992cc60c (diff) | |
download | ports-904b85e26155d75cdada9e8dd47ea495706e1592.tar.gz ports-904b85e26155d75cdada9e8dd47ea495706e1592.zip |
Notes
Diffstat (limited to 'devel/horde-chora/pkg-deinstall')
-rw-r--r-- | devel/horde-chora/pkg-deinstall | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/devel/horde-chora/pkg-deinstall b/devel/horde-chora/pkg-deinstall new file mode 100644 index 000000000000..02a46f12daa8 --- /dev/null +++ b/devel/horde-chora/pkg-deinstall @@ -0,0 +1,27 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# Backup Chora config files, if needed. + +if [ x$2 != xDEINSTALL ]; then + exit +fi + +if [ -z "${PACKAGE_BUILDING}" ]; then + for cf in `ls ${PKG_PREFIX}/www/horde/chora/config/*php ${PKG_PREFIX}/www/horde/chora/config/*txt`; 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 |