From 6fbeb96ae6e9f6e5d38dd737a5776fd7e7283ffe Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Thu, 25 Feb 2021 11:54:38 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Make=20supports?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 77 ++++++++++++++++++++++++++++++++++++++++++++++ bitmapper/Makefile | 8 ++--- 2 files changed, 81 insertions(+), 4 deletions(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..6a1982717 --- /dev/null +++ b/Makefile @@ -0,0 +1,77 @@ +all: clean render build + +unix: clean render bitmaps + @cd builder && make setup build_unix + +windows: clean render bitmaps + @cd builder && make setup build_windows + +.PHONY: all + +clean: + @rm -rf bitmaps themes + +modern: clean render_modern build_modern +original:clean render_original build_original + +# +# Render Bibata Bitmaps +# + +render: bitmapper svg + @cd bitmapper && make install render_modern render_original + +render_original: bitmapper svg + @cd bitmapper && make install render_original + +render_modern: bitmapper svg + @cd bitmapper && make install render_modern + +# +# Build Bibata Unix & Windows cursors +# + +build: bitmaps + @cd builder && make setup build + +build_modern: bitmaps + @cd builder && make setup build_modern + +build_original: bitmaps + @cd builder && make setup build_original + +# +# Installation +# + +.ONESHELL: +SHELL:=/bin/bash + +src = "./themes/Bibata-*-*" +local := ~/.icons +local_dest := $(local)/$(theme) + +root := /usr/share/icons +root_dest := $(root)/$(theme) + +install: $(src) + @if [[ $EUID -ne 0 ]]; then + @echo "> Installing '$(theme)' cursors inside $(local)/..." + @mkdir -p $(local) + @cp -r $(src) $(local_dest) && echo "> Installed!" + @else + @echo "> Installing '$(theme)' cursors inside $(root)/..." + @mkdir -p $(root) + @sudo cp -r $(src) $(root_dest) && echo "> Installed!" + @fi + +uninstall: + @if [[ $EUID -ne 0 ]]; then + @echo "> Removing '$(local_dest)'..." + @rm -rf $(local_dest) + @else + @echo "> Removing '$(root_dest)'..." + @sudo rm -rf $(root_dest) + @fi + +reinstall: uninstall install diff --git a/bitmapper/Makefile b/bitmapper/Makefile index 74165305e..a244ff35c 100644 --- a/bitmapper/Makefile +++ b/bitmapper/Makefile @@ -10,12 +10,12 @@ node_modules: @mkdir -p $@ install: node_modules package.json - @yarn install + @yarn install -render_bibata_modern: +render_modern: @yarn render:bibata-modern -render_bibata_original: +render_original: @yarn render:bibata-original -render: render_bibata_modern render_bibata_original +render: render_modern render_original