diff options
Diffstat (limited to 'brother-brscan-skey/doinst.sh')
| -rw-r--r-- | brother-brscan-skey/doinst.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/brother-brscan-skey/doinst.sh b/brother-brscan-skey/doinst.sh new file mode 100644 index 0000000..340031a --- /dev/null +++ b/brother-brscan-skey/doinst.sh @@ -0,0 +1,17 @@ +############### +# Config file # +############### +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 opt/brother/scanner/brscan-skey/brscan-snmp.cfg.new |
