-
Notifications
You must be signed in to change notification settings - Fork 37
/
Makefile
30 lines (26 loc) · 844 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
EXTNAME = "chrome-github-boxcutter"
CHROME = /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome
all: crx
zip: extension/*
cp ./node_modules/jquery/dist/jquery.min.js ./extension
@-rm -rf $(EXTNAME).zip $(EXTNAME) || true
@mkdir $(EXTNAME)
@cp extension/* $(EXTNAME)
@mkdir dist 2> /dev/null || true
zip -r dist/$(EXTNAME).zip $(EXTNAME)
@-rm -rf $(EXTNAME)
crx: extension/*
cp ./node_modules/jquery/dist/jquery.min.js ./extension
@mkdir dist 2> /dev/null || true
@-rm -rf dist/$(EXTNAME).crx $(EXTNAME) || true
@mkdir $(EXTNAME)
@cp extension/* $(EXTNAME)
ifeq ($(wildcard $(EXTNAME).pem),)
$(CHROME) --pack-extension=$(EXTNAME)
else
$(CHROME) --pack-extension=$(EXTNAME) --pack-extension-key=$(EXTNAME).pem
endif
@-mv $(EXTNAME).crx dist/
@-rm -rf $(EXTNAME)
clean:
@-rm -rf *.zip *.crx $(EXTNAME) dist || true