slackbuilds_ponce/office/docx2txt/doinst.sh
Phillip Warner ab09016092 office/docx2txt: Added (docx to text converter).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2014-03-24 13:02:14 +07:00

13 lines
378 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/docx2txt.config.new