#!/bin/sh
set -e

if [ "$1" = "configure" ]; then
	SIZES=$(ls /usr/share/icons/gnome-colors-common/*/places | sed -rn 's,^.*/([0-9]+)x[0-9]+/.*$,\1,p')

	command="update-alternatives --install /usr/share/icons/gnome/scalable/places/start-here.svg start-here.svg /usr/share/icons/gnome-colors-common/scalable/places/gnome-colors.svg 20"
	for s in $SIZES; do
		command="$command --slave /usr/share/icons/gnome/${s}x${s}/places/start-here.png start-here-${s}.png /usr/share/icons/gnome-colors-common/${s}x${s}/places/gnome-colors.png"
	done
	$command
fi

# Automatically added by dh_icons/13.1
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
	if which update-icon-caches >/dev/null 2>&1 ; then
		update-icon-caches /usr/share/icons/gnome-colors-common
	fi
fi
# End automatically added section

