#!/bin/sh

set -e

readonly optbin="/opt/diesel"

for lnk in $optbin; do
 if [ -L $lnk ]; then
  rm -f $lnk
 fi
done

if [ "$1" = "configure" ] && [ -x "`which update-mime 2> /dev/null`" ]; then
  if which update-mime > /dev/null 2>&1; then
   update-mime
  fi
  if which update-desktop-database > /dev/null 2>&1; then
    update-desktop-database -q
  fi
fi
