~baltix-members/baltix-default-settings/ubuntu

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#! /bin/sh

set -e

write_cache()
{
if [ -x /usr/bin/gtk-update-icon-cache ]; then
    if ! gtk-update-icon-cache --force --quiet /usr/share/icons/gnome; then
        echo "WARNING: icon cache generation failed"
    fi
fi
}

if [ "$1" = "triggered" ]; then
    write_cache
    exit 0
fi

#DEBHELPER#

case "$1" in
  configure)
    if [ -d /etc/gdm ]; then
    	update-alternatives --install /etc/gdm/gdm-cdd.conf gdm-config-derivative /etc/xdg/baltix/gdm/gdm.conf 50
    fi
    if [ "$1" = "configure" ] && which update-gconf-defaults >/dev/null 2>&1; then
        update-gconf-defaults
    fi
    cp -b /etc/firefox/profile/bookmarks-lt.html /etc/firefox/profile/bookmarks.html

    # perform software repositories configuration.
    if [ -r /usr/sbin/add-baltix-repositories ]; then
        nohup sh /usr/sbin/add-baltix-repositories > /dev/null 2>&1 &
    fi
    ;;
esac

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

( while read name prio; do
    command="update-alternatives --install /usr/share/icons/gnome/scalable/places/start-here.svg start-here.svg /usr/share/icons/gnome/scalable/places/$name.svg $prio"
    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/${s}x${s}/places/$name.png"
    done
    $command
  done ) << EOF
start-here-baltix 70
EOF

write_cache