diff options
author | Matteo Bernardini <ponce@slackbuilds.org> | 2012-09-08 10:55:41 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2012-09-08 17:28:33 -0500 |
commit | f4e6a0b62818a787eec9c1637de246979e6fb942 (patch) | |
tree | 183ead636186ba223b8154244495294f4007ac55 /system/slackyd/doinst.sh | |
parent | 7316445ee3cd818b6974b881cf53a30e02a4f3a9 (diff) |
system/slackyd: Added (slacky downloader).
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'system/slackyd/doinst.sh')
-rw-r--r-- | system/slackyd/doinst.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/system/slackyd/doinst.sh b/system/slackyd/doinst.sh new file mode 100644 index 0000000000000..455e41c588009 --- /dev/null +++ b/system/slackyd/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/slackyd/slackyd.conf.new |