forked from espruino/EspruinoDocs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·74 lines (59 loc) · 2.26 KB
/
build.sh
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/bin/bash
# Copyright (c) 2013 Gordon Williams, Pur3 Ltd. See the file LICENSE for copying permission.
cd `dirname $0`
DIR=`pwd`
WEBSITE=~/workspace/espruinowebsite
mkdir -p $WEBSITE $WEBSITE/www/img $WEBSITE/www/scripts
mkdir -p html/refimages
mkdir -p html/boards
rm -f html/*.html
rm -f html/*.js
rm -f html/refimages/*
rm -f html/boards/*
nodejs bin/commenter.js
cd ../Espruino
python scripts/build_board_docs.py PICO_R1_3 pinout
mv boards/PICO_R1_3.html $DIR/html/boards
cp boards/img/PICO_R1_3.png $WEBSITE/www/img
python scripts/build_board_docs.py ESPRUINOBOARD pinout
mv boards/ESPRUINOBOARD.html $DIR/html/boards
cp boards/img/ESPRUINOBOARD.png $WEBSITE/www/img
python scripts/build_board_docs.py ESP8266_BOARD pinout
mv boards/ESP8266_BOARD.html $DIR/html/boards
cp boards/img/ESP8266_BOARD.png $WEBSITE/www/img
python scripts/build_board_docs.py EMW3165 pinout
mv boards/EMW3165.html $DIR/html/boards
cp boards/img/EMW3165.png $WEBSITE/www/img
python scripts/build_board_docs.py MICROBIT pinout
mv boards/MICROBIT.html $DIR/html/boards
cp boards/img/ESPRUINOWIFI.png $WEBSITE/www/img
python scripts/build_board_docs.py ESPRUINOWIFI pinout
mv boards/ESPRUINOWIFI.html $DIR/html/boards
cp boards/img/ESPRUINOWIFI.png $WEBSITE/www/img
python scripts/build_board_docs.py PUCKJS pinout
mv boards/PUCKJS.html $DIR/html/boards
cp boards/img/PUCKJS_.jpg $WEBSITE/www/img
python scripts/build_board_docs.py PUCKJS pinout
mv boards/PUCKJS.html $DIR/html/boards
cp boards/img/PUCKJS_.jpg $WEBSITE/www/img
python scripts/build_board_docs.py ESP32 pinout
mv boards/ESP32.html $DIR/html/boards
cp boards/img/ESP32.jpg $WEBSITE/www/img
python scripts/build_board_docs.py WIO_LTE pinout
mv boards/WIO_LTE.html $DIR/html/boards
cp boards/img/WIO_LTE.jpg $WEBSITE/www/img
cd $DIR
# Built reference docs and references.json
nodejs bin/build.js || exit 1
#rm $WEBSITE/reference/*
cp html/*.html $WEBSITE/reference/
cp html/keywords.js $WEBSITE/www/js
cp datasheets/* $WEBSITE/www/datasheets
cp files/* $WEBSITE/www/files
mkdir -p $WEBSITE/www/refimages
rm $WEBSITE/www/refimages/*
cp html/refimages/* $WEBSITE/www/refimages
# Resize any images that might be too big, and remove metadata
mogrify -resize "600x800>" -strip $WEBSITE/www/refimages/*
# -----------------------------------
bash buildmodules.sh