# The hook only runs when a transaction touches the launchers of ScummVM or DOSBox. When they were
# installed before plinius-dos-installer, nothing does, so they are hidden here as well.
# On removal they come back, otherwise the apps would have no icon at all.
_launchers="usr/share/applications/org.scummvm.scummvm.desktop
usr/share/applications/dosbox.desktop"

post_install() {
	echo "$_launchers" | /usr/share/libalpm/scripts/plinius-hide-apps
}

post_upgrade() {
	post_install
}

post_remove() {
	for f in $_launchers; do
		[ -f "/$f" ] && sed -i '/^NoDisplay=true$/d' "/$f"
	done
	return 0
}
