diff --git a/Makefile b/Makefile index 71be7564f8e7617f2eb5a4ac5a8110559e6d96d8..59cc5295039a700cee7e5633f564231be48d1be0 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,30 @@ USRBIN := /usr/local/bin +SYSTEMD_DIR := /etc/systemd/system +CONFIG_FILE := /etc/plymouth-themes.json install: + @echo "Installing..." install -m755 plymouth-random-theme $(USRBIN) + install plymouth-theme.service plymouth-theme.timer $(SYSTEMD_DIR) + @echo "Done" + @echo -n "Reloading systemd..." + systemctl daemon-reload + @echo "Done" + @echo "Type 'systemctl enable --now plymouth-theme.timer' to enable the timer" uninstall: - rm -rf $(USRBIN)/plymouth-random-theme - @echo "make uninstall will not remove anything in /etc/plymouth-themes.json" && \ - echo "Do 'sudo make purge' to remove it." + @echo -n "Removing installed files..." + rm -rf $(USRBIN)/plymouth-random-theme $(SYSTEMD_DIR)/plymouth-theme.service $(SYSTEMD_DIR)/plymouth-theme.timer + @echo "Done" + @echo -n "Reloading systemd..." + systemctl daemon-reload + @echo "Done" + @echo "NOTE: make uninstall will not remove anything in $(CONFIG_FILE)" && \ + echo "Do 'sudo make purge' to remove it. Ignore if you are already running sudo make purge" # Remove config files, like apt purge. Purge should first do what # uninstall does, so we add uninstall as a dependency to this rule. purge: uninstall - rm -rf /etc/plymouth-themes.json + @echo "Removing config files..." + rm -rf $(CONFIG_FILE) + @echo "Done"