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

15 lines
373 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/ssh2.ini.new