summaryrefslogtreecommitdiff
path: root/libraries/php-redis/doinst.sh
diff options
context:
space:
mode:
authorEbben Aries <e@dscp.org>2015-11-23 07:30:50 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2015-11-28 07:25:59 +0700
commita9af23fa2eb1830507f1a615a7ee0c42a3ee5c3c (patch)
tree426521a021e4a8af7a0e07e6177f23c867450b5a /libraries/php-redis/doinst.sh
parent8f10a9a937b7e7b32fec7c5e64805a9256beb014 (diff)
downloadslackbuilds-a9af23fa2eb1830507f1a615a7ee0c42a3ee5c3c.tar.gz
libraries/php-redis: Added (Redis bindings for PHP).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries/php-redis/doinst.sh')
-rw-r--r--libraries/php-redis/doinst.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/libraries/php-redis/doinst.sh b/libraries/php-redis/doinst.sh
new file mode 100644
index 0000000000..3f7d33d743
--- /dev/null
+++ b/libraries/php-redis/doinst.sh
@@ -0,0 +1,14 @@
+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.d/redis.ini.new