summaryrefslogtreecommitdiff
path: root/development/dao/doinst.sh
diff options
context:
space:
mode:
authorDimitris Zlatanidis <d.zlatanidis@gmail.com>2014-04-03 19:57:13 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2014-04-07 14:43:52 +0700
commit68d4a9b6cf257bafa66b99bed3af81941d4a6a88 (patch)
treeaa1620fc6599402cb8b5e2fe0126ad8bc51a58a4 /development/dao/doinst.sh
parenteb6d03d83f68fbaf4d4800eb435a5b3fdff92bf5 (diff)
downloadslackbuilds-68d4a9b6cf257bafa66b99bed3af81941d4a6a88.tar.gz
development/dao: Added (The Dao Programming Language).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/dao/doinst.sh')
-rw-r--r--development/dao/doinst.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/development/dao/doinst.sh b/development/dao/doinst.sh
new file mode 100644
index 0000000000..84c9f57459
--- /dev/null
+++ b/development/dao/doinst.sh
@@ -0,0 +1,18 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+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/dao.conf.new