summarylogtreecommitdiffstats
path: root/ricoh-sp220-som.install
blob: 781a5e311b404f472553ec0fae33363d164cec7b (plain)
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

name=smart-organizing-monitor-for-sp-200series

install_system_icons() {
	# Add icons to the system icons
	XDG_ICON_RESOURCE="`which xdg-icon-resource 2> /dev/null`"
	if [ -x "$XDG_ICON_RESOURCE" ]; then
	    for icon in "/opt/$name/som_"*.png; do
			size="${icon##*/som_}"
			"$XDG_ICON_RESOURCE" $1 --size "${size%.png}" "$icon" $name
	    done
	fi
}

post_upgrade() {
	#update the menu
	UPDATE_MENUS="`which update-menus 2> /dev/null`"
	#update the menu
	if [ -x "$UPDATE_MENUS" ]; then
	  update-menus
	fi
}

post_install() {
	install_system_icons install

	post_upgrade

	#add w+r for DevCfg.ini
	rm -f /home/*/.sdcdevcfgnetb.ini
	rm -f /home/*/.som200series.ini
	rm -f /home/*/.som200seriesa.ini
	rm -f /home/*/.som_ui.ini
	rm -f /home/*/.som_uia.ini
}

post_remove() {
	post_upgrade
}

pre_remove() {
	install_system_icons uninstall
}