Files
desktop-planer/Makefile
2026-09-18 22:02:53 +02:00

38 lines
1.0 KiB
Makefile
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# make install – Extension installieren, falls noch nicht vorhanden, und aktivieren
# make update – installierte Extension mit dem Stand aus diesem Ordner überschreiben
UUID = desktop@marha.de
SRC = $(CURDIR)/$(UUID)
DEST = $(HOME)/.local/share/gnome-shell/extensions/$(UUID)
.ONESHELL:
.PHONY: install update enable
install:
@if [ -e "$(DEST)" ]; then
echo "Schon installiert: $(DEST)"
echo "Zum Aktualisieren: make update"
exit 0
fi
mkdir -p "$(dir $(DEST))"
cp -r "$(SRC)" "$(DEST)"
$(MAKE) --no-print-directory enable
echo "Installiert. Jetzt ab- und wieder anmelden."
update:
@if [ ! -e "$(DEST)" ]; then
echo "Nicht installiert. Zuerst: make install"
exit 1
fi
if [ -L "$(DEST)" ]; then
echo "$(DEST) ist ein Symlink auf $(SRC), nichts zu kopieren."
else
rm -rf "$(DEST)"
cp -r "$(SRC)" "$(DEST)"
echo "Aktualisiert."
fi
echo "Änderungen wirken nach dem nächsten Ab- und Anmelden."
# UUID in die aktiven Extensions eintragen, falls sie fehlt
enable:
@python3 dev/enable.py "$(UUID)"