Makefile 360 B

1234567891011
  1. wrk-dir := $(shell pwd)
  2. dst-dir := $(CRX_DST_DIR)
  3. pem-dir := $(CRX_PEM_DIR)
  4. ext-name := $(shell basename $(wrk-dir))
  5. $(dst-dir)/$(ext-name).crx: manifest.json
  6. @echo ID: $(shell openssl rsa -pubout -outform DER -in $(pem-dir)/$(ext-name).pem 2>/dev/null | sha256sum | head -c32 | tr 0-9a-f a-p)
  7. @cd ..
  8. @crx3 -p $(pem-dir)/$(ext-name).pem -o [email protected] $(wrk-dir)