]> git.donarmstrong.com Git - neurodebian.git/blob - debian/neurodebian-desktop.postinst
minor tune up for the changelog
[neurodebian.git] / debian / neurodebian-desktop.postinst
1 #!/bin/bash -e
2
3 # taken from gnome-icon-theme package postinst
4 write_cache()
5 {
6 if [ -x /usr/bin/gtk-update-icon-cache ]; then
7     if ! gtk-update-icon-cache --force --quiet /usr/share/icons/gnome; then
8         echo "WARNING: icon cache generation failed"
9     fi
10 fi
11 }
12
13 if [ "$1" = "triggered" ]; then
14     write_cache
15     exit 0
16 fi
17
18
19 if [ "$1" = "configure" -o "$1" = "abort-upgrade" ]; then
20     # Alternatives for the background (use higher priority than desktop-base
21     update-alternatives --install \
22         /usr/share/images/desktop-base/desktop-background \
23         desktop-background \
24         /usr/share/backgrounds/neurodebian.png 100
25
26     # push SVG icon and pixmaps for all relevant sizes
27     SIZES=$(ls /usr/share/icons/gnome/*/places | sed -rn 's,^.*/([0-9]+)x[0-9]+/.*$,\1,p')
28     command="update-alternatives --install /usr/share/icons/gnome/scalable/places/start-here.svg start-here.svg /usr/share/pixmaps/neurodebian.svg 100"
29     for s in $SIZES; do
30       command="$command --slave /usr/share/icons/gnome/${s}x${s}/places/start-here.png start-here-${s}.png /usr/share/pixmaps/neurodebian.png"
31     done
32     $command
33
34     # let GTK know about the change
35     write_cache
36 fi
37
38 #DEBHELPER#
39