From 8f75fa200e1042f09f0fe3c4805f5600e3567f54 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Wed, 28 Dec 2022 13:51:16 +0100 Subject: makefile shuffle + WIP yomichan sentence export patch --- yomichan/makefile | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 yomichan/makefile (limited to 'yomichan/makefile') diff --git a/yomichan/makefile b/yomichan/makefile new file mode 100644 index 0000000..a4f19df --- /dev/null +++ b/yomichan/makefile @@ -0,0 +1,30 @@ +all: + +.PHONY: clean patch update + +include ../common.mk + +yomichan/js/user.js: sentence-export.min.js yomichan + ln -sf ../../$< $@ + +yomichan-chrome.zip: + curl https://github.com/FooSoft/yomichan/releases/latest/download/$@ -Lso- > $@ + +yomichan: yomichan-chrome.zip + unzip -qo yomichan-chrome.zip -d yomichan + +yomichan/manifest.json.bak: yomichan/manifest.json + mv $< $@ + jq '.content_scripts[0].js[.content_scripts[0].js | length] |= .+ "js/user.js"' $@ > $< + +yomichan/search.html.bak: yomichan/search.html + mv $< $@ + sed 's##\n#' $@ > $< + +patch: yomichan yomichan/search.html.bak yomichan/manifest.json.bak + +update: yomichan + +clean: + $(RM) sentence-export.min.js sentence-export.src + -- cgit v1.2.3