diff options
Diffstat (limited to 'system/spman/doinst.sh')
-rw-r--r-- | system/spman/doinst.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/system/spman/doinst.sh b/system/spman/doinst.sh new file mode 100644 index 0000000000..1a56316bdd --- /dev/null +++ b/system/spman/doinst.sh @@ -0,0 +1,15 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + rm $NEW + fi +} + +CONFIGS="blacklist repo-list spman.conf" + +for file in $CONFIGS; do + config etc/spman/${file}.new +done |