forked from duckduckgo/opera-zeroclickinfo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·34 lines (27 loc) · 956 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
31
32
33
34
EXTNAME := opera-zeroclick
KEYFILE := $(EXTNAME).pem
SHELL := /usr/bin/env bash
CHROME := opera-developer -n --args
CWD := $(shell pwd)
TMPDIR := $(shell mktemp -d)
VERSION := $(shell python2 -c "import json,sys;print json.loads(sys.stdin.read()).get('version','')" < manifest.json)
ITEMS := css/ html/ img/ js/ manifest.json
all: pack
movebuild:
rm -rf $(TMPDIR)
mkdir $(TMPDIR)
cp -R $(ITEMS) $(TMPDIR)
moveout: $(ITEMS)
mkdir $(TMPDIR)/$(EXTNAME)
cp -R $(ITEMS) $(TMPDIR)/$(EXTNAME)
nex: moveout
$(CHROME) --pack-extension=$(TMPDIR)/$(EXTNAME) \
--pack-extension-key=$(KEYFILE) --no-message-box
mv $(TMPDIR)/$(EXTNAME).nex $(CWD)/build/$(EXTNAME)-latest.nex
zip: moveout
cd $(TMPDIR)/$(EXTNAME)/ && zip $(EXTNAME)-$(VERSION).zip -r ./*
cp $(TMPDIR)/$(EXTNAME)/$(EXTNAME)-$(VERSION).zip $(CWD)
build: zip
mv $(CWD)/$(EXTNAME)-$(VERSION).zip ~/dropbox/Dropbox/DuckDuckGo\ Assets/Extensions/Chrome/
clean:
rm $(CWD)/*.zip