summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorch1p <me@ch1p.com>2017-12-20 15:45:32 +0300
committerch1p <me@ch1p.com>2017-12-20 15:45:32 +0300
commite594190eb55a88b729a10c622a40e769dff4b31e (patch)
treef58f2d37c7073ec158a7fab7933969cc2b20cc76 /Makefile
parentf34b0804254e929f53d3b3d93b675604f34a02e8 (diff)
update Makefile, update readme
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile35
1 files changed, 18 insertions, 17 deletions
diff --git a/Makefile b/Makefile
index b59c467..9197e19 100644
--- a/Makefile
+++ b/Makefile
@@ -90,26 +90,27 @@ $(GENERATED)/.submodules:
mkdir "$(GENERATED)"
touch "$(GENERATED)/.submodules"
-$(GENERATED)/.prepare: $(GENERATED)/.submodules
- rm -rf $(foreach i,xfwm4 metacity-1 openbox-3 xfce-notify-4.0 index.theme,$(BASE)/$(i))
- $(MAKE) -C "$(BASE)" install DESTDIR="$(GENERATED)"
- mv "$(GENERATED)/usr/share/themes/Numix" "$(GENERATED)/Numix"
- rm -rf "$(GENERATED)/usr"
- for f in $$(find $(GENERATED)/Numix -maxdepth 1 -type d);do \
- cd "$$f"; \
- [ -d "$$f/dist" ] && mv -f "$$f"/dist/* "$$f"/ || true; \
- done
- find $(GENERATED)/Numix -empty -delete
- touch "$(GENERATED)/.prepare"
-
-$(GENERATED)/.success-Shiki-%: $(GENERATED)/.prepare
- cp -r $(GENERATED)/Numix $(GENERATED)/Shiki-$*
- find $(GENERATED)/Shiki-$* -type f -print0 | xargs -0 sed -i \
+$(GENERATED)/.success-Shiki-%: $(GENERATED)/.submodules
+ $(eval TEMP_DIR := $(shell mktemp -d))
+ $(foreach SRC_DIR,src scripts Makefile,cp -r $(BASE)/$(SRC_DIR) $(TEMP_DIR)/$(SRC_DIR);)
+ find "$(TEMP_DIR)/src" -type f -iregex '.*\(\.css\|\.scss\|gtkrc\|\.svg\)$$' -print0 | xargs -0 sed -i \
-e 's/#d64937/#$(Shiki-$*_selected)/g' \
-e 's/#f0544c/#$(Shiki-$*_selected)/g' \
-e 's/#444*/#$(Shiki-$*_dark_bg)/g'
- find $(GENERATED)/Shiki-$* -maxdepth 1 -not -type d -print0 | xargs -0 rm -f
- rm -rf $(GENERATED)/Shiki-$*/Shiki-$*
+ find "$(TEMP_DIR)/src/assets" -type f -iname "*png" -delete
+ sed -i 's/#f1544d/#$(Shiki-$*_selected)/g' "$(TEMP_DIR)/src/assets/all-assets.svg"
+ pushd "$(TEMP_DIR)/scripts";\
+ ./render-assets.sh;\
+ popd
+ mkdir "$(TEMP_DIR)/generated"
+ $(MAKE) -C "$(TEMP_DIR)" install DESTDIR="$(TEMP_DIR)/generated"
+ mv "$(TEMP_DIR)/generated/usr/share/themes/Numix" "$(GENERATED)/Shiki-$*"
+ rm -rf "$(TEMP_DIR)"
+ for f in $$(find $(GENERATED)/Shiki-$* -maxdepth 1 -type d);do \
+ cd "$$f"; \
+ [ -d "$$f/dist" ] && mv -f "$$f"/dist/* "$$f"/ || true; \
+ done
+ find $(GENERATED)/Shiki-$* -empty -delete
touch "$(GENERATED)/.success-Shiki-$*"
$(GENERATED)/.success: $(foreach COLOR,$(COLORS),$(GENERATED)/.success-Shiki-$(COLOR))