pre_install() {
	sudo git clone --recurse-submodules -j8 https://github.com/time-killer-games/stigma-dev /usr/bin/stigma-dev
	[ -d "/usr/bin/stigma-dev" ] && cd /usr/bin/stigma-dev && sudo make clean && sudo make && sudo make emake && sudo chmod +x /usr/bin/stigma-dev/install.sh && sudo /usr/bin/stigma-dev/install.sh && sudo cp -f /usr/bin/stigma-dev/stigma-dev.desktop /usr/share/applications/stigma-dev.desktop && sudo chmod +x /usr/share/applications/stigma-dev.desktop
	echo "Installation Complete! You may now run the \"stigma-dev.desktop\" Desktop Entry!"
}

pre_upgrade() {
	pre_install
}

pre_remove() {
	[ -d "/usr/bin/stigma-dev" ] && sudo rm -fr /usr/bin/stigma-dev && sudo rm -f /usr/share/applications/stigma-dev.desktop
}
