mirror of
https://github.com/ful1e5/apple_cursor.git
synced 2025-05-20 10:15:19 -04:00
💾 Install & uninstall scripts
This commit is contained in:
parent
8540175d61
commit
ecbbc3ff44
1 changed files with 32 additions and 21 deletions
53
Makefile
53
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
|
Loading…
Add table
Add a link
Reference in a new issue