summarylogtreecommitdiffstats
path: root/lycheeslicer.install
blob: ebb3904ad693be585483d573fb5f55200e1c841d (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
post_install() {
	xdg-icon-resource forceupdate --theme hicolor &> /dev/null

	# Link to the binary
	ln -sf '/opt/LycheeSlicer/lycheeslicer' '/usr/bin/lycheeslicer'

	# SUID chrome-sandbox for Electron 5+
	chmod 4755 '/opt/LycheeSlicer/chrome-sandbox' || true

	update-mime-database /usr/share/mime || true
	update-desktop-database /usr/share/applications || true
	update-desktop-database -q
}

post_upgrade() {
	post_install
}

post_remove() {
	xdg-icon-resource forceupdate --theme hicolor &> /dev/null

	# Delete the link to the binary
	rm -f '/usr/bin/lycheeslicer'
	update-desktop-database -q
}