Skip to content
Snippets Groups Projects
Unverified Commit dd2150f9 authored by Oliver Smith's avatar Oliver Smith
Browse files

Makefile: add uninstall target

Make it easy for users to test versions from a git repository by having
an easy way to uninstall.
parent 1a53040d
No related branches found
No related tags found
No related merge requests found
......@@ -47,4 +47,13 @@ install: all
install -Dm644 org.postmarketos.mobile_config_firefox.metainfo.xml \
"$(DESTDIR)/usr/share/metainfo/org.postmarketos.mobile_config_firefox.metainfo.xml"
.PHONY: all clean install
uninstall:
src/prepare_uninstall.sh "$(FIREFOX_DIR)" "$(DESTDIR)"
rm -fv "$(DESTDIR)/$(FIREFOX_CONFIG_DIR)/policies/policies.json"
rm -fv "$(DESTDIR)/$(FIREFOX_DIR)/defaults/pref/mobile-config-prefs.js"
rm -fv "$(DESTDIR)/$(FIREFOX_DIR)/mobile-config-autoconfig.js"
rm -rfv "$(DESTDIR)/etc/mobile-config-firefox"
rm -fv "$(DESTDIR)/usr/share/metainfo/org.postmarketos.mobile_config_firefox.metainfo.xml"
.PHONY: all clean install uninstall
#!/bin/sh -e
FIREFOX_DIR="$1"
DESTDIR="$2"
echo
if [ -z "$DESTDIR" ] && [ "$(id -u)" != 0 ]; then
echo "ERROR: run 'make uninstall' as root"
echo
echo "For example:"
echo "$ sudo make FIREFOX_DIR=$FIREFOX_DIR uninstall"
echo
exit 1
fi
echo "You are about to delete some files and directories, where you may"
echo "have other firefox customizations than mobile-config-firefox."
echo "Check the Makefile if unsure."
echo
echo "If you want to go back to your distribution's version of"
echo "mobile-config-firefox, make sure to reinstall the package"
echo "afterwards with the package manager (apk, apt, pacman, ...)."
echo
echo -n "Do you really want to uninstall mobile-config-firefox? [y/N] "
read answer
case "$answer" in
[yY])
exit 0;;
*)
exit 1;;
esac
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment