summarylogtreecommitdiffstats
path: root/cubic-bin.install
blob: 5d4d9a55f3d6e0c9d7f60ac49bf3af66a4ce7026 (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
post_install() {
	gtk-update-icon-cache -q -t -f usr/share/icons/hicolor

	if command -v py3compile >/dev/null 2>&1; then
		py3compile -p cubic /usr/share/cubic -V 3.6-
	fi
	if command -v pypy3compile >/dev/null 2>&1; then
		pypy3compile -p cubic /usr/share/cubic -V 3.6- || true
	fi

	update-desktop-database -q
	ln -s /usr/bin/lsinitcpio /usr/bin/lsinitramfs
}

post_upgrade() {
	post_install
}

pre_remove() {

	if command -v py3clean >/dev/null 2>&1; then
		py3clean -p cubic
	fi
}

post_remove() {
	gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
	update-desktop-database -q
	rm -rf /usr/bin/lsinitramfs
}