forked from BIPES/BIPES
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (39 loc) · 1.46 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
DIR=ui/core
FILES_BLOCKLY1=blockly_compressed.js blocks_compressed.js javascript_compressed.js python_compressed.js media
FILES_WEBREPL=FileSaver.js term.js
git-clone:
git clone https://github.com/google/blockly.git
git clone https://github.com/micropython/webrepl.git
copy:
cd blockly; cp -pr $(FILES_BLOCKLY1) ../$(DIR)/
cp -pr blockly/msg $(DIR)/b.msg
cp -p blockly/appengine/storage.js $(DIR)/
cd webrepl; cp -pr $(FILES_WEBREPL) ../$(DIR)/
copy-bipes-blocks:
cp bipes_blocks/block_definitions.js ui/
echo "Please, add <>"
submodules:
git submodule init 'ui/freeboard'
git submodule update 'ui/freeboard'
git submodule init 'databoard'
git submodule update 'databoard'
offline:
echo "Generating offline version"
echo > ui/index_offline.html
cat ui/index.html >> ui/index_offline.html
for i in ui/toolbox/*.xml ; do \
echo "Including file $$i" ; \
echo -n "<document style='display: none' id='"OFFLINE_ >> ui/index_offline.html ; \
echo -n $$i | sed -e 's/[\/\.]/_/g' -e 's/ui_//g' >> ui/index_offline.html ; \
echo "'>" >> ui/index_offline.html ;\
cat $$i | grep -v "<document>" >> ui/index_offline.html ; \
done
echo "<script>" >> ui/index_offline.html
echo "OFFLINE_devinfo_devinfo_json = \`" >> ui/index_offline.html
cat ui/devinfo/devinfo.json >> ui/index_offline.html
echo "\`;" >> ui/index_offline.html
echo "</script>" >> ui/index_offline.html
cat ui/isOffline.js >> ui/index_offline.html
zip -q -r bipes_offline.zip *
doc:
cd docs && make html