diff --git a/Makefile b/Makefile index 8f74be5..3fea5b6 100644 --- a/Makefile +++ b/Makefile @@ -1,32 +1,43 @@ -all: clean render build install +theme := macOSBigSur +src := ./themes/$(theme) + +local := ~/.icons +local_dest := $(local)/$(theme) + +root := /usr/share/icons +root_dest := $(root)/$(theme) + +all: clean render build .PHONY: all clean: - rm -rf pngs themes + @rm -rf pngs themes -render: - cd bitmap && $(MAKE) +render: bitmap svg + @cd bitmap && $(MAKE) -build: - cd builder && $(MAKE) +build: pngs + @cd builder && $(MAKE) -SHELL:=/bin/bash .ONESHELL: -install: themes/macOSBigSur - if [[ $EUID -ne 0 ]]; then - rm -rf ~/.icons/macOSBigSur - cp -r themes/macOSBigSur ~/.icons/ - else - sudo rm -rf /usr/share/icons/macOSBigSur - sudo cp -r themes/macOSBigSur /usr/share/icons/ - fi +SHELL:=/bin/bash +install: themes/macOSBigSur + @echo "> Installing '$(theme)' cursors..." + @if [[ $EUID -ne 0 ]]; then + @mkdir -p $(local) + @cp -r $(src) $(local_dest) && echo "> Installed!" + @else + @mkdir -p $(root) + @sudo cp -r $(src) $(root_dest) && echo "> Installed as root!" + @fi uninstall: - if [[ $EUID -ne 0 ]]; then - rm -rf ~/.icons/macOSBigSur - else - sudo rm -rf /usr/share/icons/macOSBigSur - fi - + @if [[ $EUID -ne 0 ]]; then + @echo "> Removing '$(local_dest)'..." + @rm -rf $(local_dest) + @else + @echo "> Removing '$(root_dest)'..." + @sudo rm -rf $(root_dest) + @fi \ No newline at end of file