diff options
author | Dimitris Zlatanidis <d.zlatanidis@gmail.com> | 2014-01-21 22:56:32 +0700 |
---|---|---|
committer | Erik Hanson <erik@slackbuilds.org> | 2014-01-29 23:21:09 -0600 |
commit | a4e2b5a930f57ad1980bde4b443d50cf7d4b8f2c (patch) | |
tree | 91f8468befdc4f11bc98f17e26442c23bd6b40fc /system/autoarchive/doinst.sh | |
parent | 8eb69e64be754c60ca3b85a6721a3d711af3a272 (diff) |
system/autoarchive: Added (A simple backup utility).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/autoarchive/doinst.sh')
-rw-r--r-- | system/autoarchive/doinst.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/system/autoarchive/doinst.sh b/system/autoarchive/doinst.sh new file mode 100644 index 0000000000000..13f58a01e8355 --- /dev/null +++ b/system/autoarchive/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 +} + +config /etc/aa/aa.conf.new + +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi |