#!/bin/bash

set -e

if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-remove" ]; then
  update-alternatives --install /usr/share/icons/gnome/scalable/places/start-here.svg start-here.svg /usr/share/icons/PointLinux-Faenza/places/scalable/start-here.svg 40
  if [ -x /usr/bin/gtk-update-icon-cache ]; then
    for DIR in PointLinux-Faenza PointLinux-Faenza-Dark; do
      if ! gtk-update-icon-cache --force --quiet /usr/share/icons/$DIR; then
        echo "WARNING: icon cache generation failed"
      fi
    done
  fi
fi