diff options
author | Thierry Thomas <thierry@FreeBSD.org> | 2004-12-26 10:23:36 +0000 |
---|---|---|
committer | Thierry Thomas <thierry@FreeBSD.org> | 2004-12-26 10:23:36 +0000 |
commit | 4c395e97edebc723608cf203afa07bdbc8ba854d (patch) | |
tree | 98741ead587e990137e9ee7c9213d210e9b0f224 /mail/horde-ingo/pkg-deinstall | |
parent | de68a058bfd96eec3e7101d045e39163958bbb96 (diff) | |
download | ports-4c395e97edebc723608cf203afa07bdbc8ba854d.tar.gz ports-4c395e97edebc723608cf203afa07bdbc8ba854d.zip |
Notes
Diffstat (limited to 'mail/horde-ingo/pkg-deinstall')
-rw-r--r-- | mail/horde-ingo/pkg-deinstall | 27 |
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 |