diff options
Diffstat (limited to 'development/eclipse/doinst.sh')
-rw-r--r-- | development/eclipse/doinst.sh | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/development/eclipse/doinst.sh b/development/eclipse/doinst.sh index 4557defa56..cc11d6e883 100644 --- a/development/eclipse/doinst.sh +++ b/development/eclipse/doinst.sh @@ -1,4 +1,20 @@ +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 opt/eclipse/configuration/config.ini.new +config opt/eclipse/eclipse.ini.new + if [ -x usr/bin/update-desktop-database ]; then usr/bin/update-desktop-database -q usr/share/applications fi @@ -6,4 +22,3 @@ fi if [ -x usr/bin/update-mime-database ]; then usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1 fi - |