~mer-committers/m-r/hildon-desktop-env

6 by John Bloom
Fixed update-alternatives.
1
#!/bin/sh
2
# postinst script for hildon-desktop-env
3
4
set -e
5
7 by John Bloom
Fixed update-alternatives.
6
#update-alternatives --auto x-session-manager
6 by John Bloom
Fixed update-alternatives.
7
update-alternatives --install /usr/bin/x-session-manager x-session-manager \
8
  /usr/bin/start-hildon 40
9
10
do_configure() {
11
	#Stolen from dsp-sbc by lardman who in turn got it from rm_you (although rm_you told him about it) :)
31 by Carsten V. Munk
Make sure gtk.immodules exist
12
	if [ -f /etc/gtk-2.0/gtk.immodules ]; then
13
		check=`grep "/usr/lib/gtk-2.0/2.10.0/immodules/hildon-im-module.so" /etc/gtk-2.0/gtk.immodules`
14
	else
15
		check=""
16
	fi
17
6 by John Bloom
Fixed update-alternatives.
18
	if [ "x$check" != "x" ]
19
	then
20
		echo "hildon-input-method entry already present..."
21
	else
22
		echo '"/usr/lib/gtk-2.0/2.10.0/immodules/hildon-im-module.so" "hildon-input-method" "Hildon Input Method" "hildon-input-method-framework" "/usr/share/locale" "*"' >> /etc/gtk-2.0/gtk.immodules
23
	fi
24
25
	hildon-im-recache
9 by Carsten V. Munk
0.2: Added some themeing stuff and dependancy on titan
26
	# Remove the existing symlink if it exists
27
	if [ -h '/usr/share/themes/default' ]; then
28
	    echo "Removing existing 'default' theme symlink"
29
	    rm -f '/usr/share/themes/default'
30
	fi
31
	    
32
	# From hildon-application-framework
25 by Carsten V. Munk
0.2-14: switch to liberty-mer and depend on marquee-plugins
33
	echo "Creating a theme symlink 'default' => 'liberty-mer' in /usr/share/themes"
34
	ln -s '/usr/share/themes/liberty-mer' '/usr/share/themes/default'
9 by Carsten V. Munk
0.2: Added some themeing stuff and dependancy on titan
35
	
36
	# Remove the existing symlink to the default wallpaper if it exists
37
	if [ -h '/usr/share/backgrounds/default.desktop' ]; then
38
		echo "Removing existing 'default.desktop' wallpaper symlink"
39
	    	rm -f '/usr/share/backgrounds/default.desktop'
40
	fi
41
	    
42
	# Create a symlink to default wallpaper
25 by Carsten V. Munk
0.2-14: switch to liberty-mer and depend on marquee-plugins
43
	echo "Creating a default wallpaper symlink 'default.desktop' => 'liberty-mer.desktop' in /usr/share/backgrounds"
44
	ln -s '/usr/share/backgrounds/liberty-mer.desktop' '/usr/share/backgrounds/default.desktop'
9 by Carsten V. Munk
0.2: Added some themeing stuff and dependancy on titan
45
	    
46
	    
6 by John Bloom
Fixed update-alternatives.
47
}
48
49
case "$1" in
50
    configure)
51
    	do_configure
52
        ;;
53
esac
54
55
56
exit 0
57
58