mirror of
https://github.com/ful1e5/apple_cursor.git
synced 2025-05-17 00:24:46 -04:00
🧰 make
This commit is contained in:
parent
076537e770
commit
a65407bf7a
1 changed files with 19 additions and 13 deletions
32
Makefile
32
Makefile
|
@ -19,8 +19,7 @@ windows: clean render bitmaps
|
||||||
|
|
||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
theme := macOSBigSur
|
src := ./themes/
|
||||||
src := ./themes/$(theme)
|
|
||||||
|
|
||||||
local := ~/.icons
|
local := ~/.icons
|
||||||
local_dest := $(local)/$(theme)
|
local_dest := $(local)/$(theme)
|
||||||
|
@ -31,35 +30,42 @@ root_dest := $(root)/$(theme)
|
||||||
.ONESHELL:
|
.ONESHELL:
|
||||||
SHELL:=/bin/bash
|
SHELL:=/bin/bash
|
||||||
|
|
||||||
|
|
||||||
install: $(src)
|
install: $(src)
|
||||||
@if [[ $EUID -ne 0 ]]; then
|
@if [[ $EUID -ne 0 ]]; then
|
||||||
@echo "> Installing '$(theme)' cursors inside $(local)/..."
|
@echo "> Installing 'macOSBigSur' cursors inside $(local)/..."
|
||||||
@mkdir -p $(local)
|
@mkdir -p $(local)
|
||||||
@cp -r $(src) $(local_dest) && echo "> Installed!"
|
@cp -r ./themes/macOSBigSur $(local_dest)
|
||||||
|
@cp -r ./themes/macOSBigSur-White $(local_dest) && echo "> Installed!"
|
||||||
@else
|
@else
|
||||||
@echo "> Installing '$(theme)' cursors inside $(root)/..."
|
@echo "> Installing 'macOSBigSur' cursors inside $(root)/..."
|
||||||
@mkdir -p $(root)
|
@mkdir -p $(root)
|
||||||
@sudo cp -r $(src) $(root_dest) && echo "> Installed!"
|
@sudo cp -r ./themes/macOSBigSur $(root_dest)
|
||||||
|
@sudo cp -r ./themes/macOSBigSur-White $(root_dest) && echo "> Installed!"
|
||||||
@fi
|
@fi
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
@if [[ $EUID -ne 0 ]]; then
|
@if [[ $EUID -ne 0 ]]; then
|
||||||
@echo "> Removing '$(local_dest)'..."
|
@echo "> Removing 'macOSBigSur' from '$(local)'..."
|
||||||
@rm -rf $(local_dest)
|
@rm -rf $(local)/macOSBigSur
|
||||||
|
@rm -rf $(local)/macOSBigSur-White
|
||||||
@else
|
@else
|
||||||
@echo "> Removing '$(root_dest)'..."
|
@echo "> Removing 'macOSBigSur' from '$(root)'..."
|
||||||
@sudo rm -rf $(root_dest)
|
@rm -rf $(root)/macOSBigSur
|
||||||
|
@rm -rf $(root)/macOSBigSur-White
|
||||||
@fi
|
@fi
|
||||||
|
|
||||||
reinstall: uninstall install
|
reinstall: uninstall install
|
||||||
|
|
||||||
|
# generates binaries
|
||||||
BIN_DIR = ../bin
|
BIN_DIR = ../bin
|
||||||
|
THEMES = White
|
||||||
prepare: bitmaps themes
|
prepare: bitmaps themes
|
||||||
# Bitmaps
|
|
||||||
@rm -rf bin && mkdir bin
|
@rm -rf bin && mkdir bin
|
||||||
@cd bitmaps && zip -r $(BIN_DIR)/bitmaps.zip * && cd ..
|
@cd bitmaps && zip -r $(BIN_DIR)/bitmaps.zip * && cd ..
|
||||||
# Themes
|
|
||||||
@cd themes
|
@cd themes
|
||||||
@tar -czvf $(BIN_DIR)/macOSBigSur.tar.gz macOSBigSur
|
@tar -czvf $(BIN_DIR)/macOSBigSur.tar.gz macOSBigSur
|
||||||
@zip -r $(BIN_DIR)/macOSBigSur_Windows.zip macOSBigSur_Windows
|
@zip -r $(BIN_DIR)/macOSBigSur-Windows.zip macOSBigSur-Windows
|
||||||
|
@$(foreach theme,$(THEMES), tar -czvf $(BIN_DIR)/macOSBigSur-$(theme).tar.gz macOSBigSur-$(theme);)
|
||||||
|
@$(foreach theme,$(THEMES), zip -r $(BIN_DIR)/macOSBigSur-$(theme)-Windows.zip macOSBigSur-$(theme)-Windows;)
|
||||||
@cd ..
|
@cd ..
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue