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

	    if [ -L '/usr/bin/xterminal' -a -e '/usr/bin/xterminal' -a "`readlink '/usr/bin/xterminal'`" != '/etc/alternatives/xterminal' ]; then
	        rm -f '/usr/bin/xterminal'
	else
	    ln -sf '/opt/XTerminal/xterminal' '/usr/bin/xterminal'
	fi

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

	if hash update-mime-database 2>/dev/null; then
	    update-mime-database /usr/share/mime || true
	fi

	if hash update-desktop-database 2>/dev/null; then
	    update-desktop-database /usr/share/applications || true
	fi
	update-desktop-database -q
}

post_upgrade() {
	post_install
}

post_remove() {
	gtk-update-icon-cache -q -t -f usr/share/icons/hicolor

	# Delete the link to the binary
	    rm -f '/usr/bin/xterminal'

	update-desktop-database -q
}