aboutsummaryrefslogtreecommitdiff
path: root/development/eclipse-php/doinst.sh
diff options
context:
space:
mode:
authorGiuseppe Di Terlizzi <giuseppe.diterlizzi@gmail.com>2018-03-12 18:11:44 +0000
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2018-03-17 08:51:47 +0700
commit05cf2e9720292fd1f9691cf5616861ab92be55f8 (patch)
treee6eaa4a65c595546486beea752b4bdbf6106af31 /development/eclipse-php/doinst.sh
parent4aed16176bc644cb81a90456ca5edd98a7c7204c (diff)
development/eclipse-php: Added (Eclipse IDE for PHP Developers).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'development/eclipse-php/doinst.sh')
-rw-r--r--development/eclipse-php/doinst.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/development/eclipse-php/doinst.sh b/development/eclipse-php/doinst.sh
new file mode 100644
index 0000000000000..95382d88a1fc0
--- /dev/null
+++ b/development/eclipse-php/doinst.sh
@@ -0,0 +1,23 @@
+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...
+}
+
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -x /usr/bin/update-mime-database ]; then
+ /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
+fi
+
+config opt/eclipse-php/configuration/config.ini.new
+config opt/eclipse-php/eclipse.ini.new