slackbuilds_ponce/libraries/php-memcache/doinst.sh
mario 3a309f52b8 libraries/php-memcache: Added (Memcached bindings for PHP).
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
2013-01-09 18:52:21 -05:00

15 lines
377 B
Bash

config() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
# If there's no config file by that name, mv it over:
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "$(cat $OLD|md5sum)" = "$(cat $NEW|md5sum)" ]; then
# toss the redundant copy
rm $NEW
fi
# Otherwise, we leave the .new copy for the admin to consider...
}
config etc/php/memcache.ini.new