summaryrefslogtreecommitdiffstats
path: root/desktop/lxpanel/doinst.sh
blob: b0778a9cb95a465f8f059061582b9951b4e7bd02 (plain)
#!/bin/sh

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 usr/share/lxpanel/profile/default/panels/panel.new 
config usr/share/lxpanel/profile/default/config.new