Revision 90896bcf
Added by koszko about 2 years ago
build.sh | ||
---|---|---|
3 | 3 |
# Copyright (C) 2021 Wojtek Kosior |
4 | 4 |
# Redistribution terms are gathered in the `copyright' file. |
5 | 5 |
|
6 |
ENDL=" |
|
7 |
" |
|
8 |
|
|
9 |
errcho() { |
|
10 |
echo "$@" >&2 |
|
11 |
} |
|
12 |
|
|
13 |
map_set_instr() { |
|
14 |
echo "$1__$2='$3'" |
|
15 |
} |
|
16 |
|
|
17 |
map_set() { |
|
18 |
eval "$(map_set_instr "$@")" |
|
19 |
} |
|
20 |
|
|
21 |
map_get() { |
|
22 |
eval "echo \"\$$1__$2\"" |
|
23 |
} |
|
24 |
|
|
25 |
map_del_instr() { |
|
26 |
echo "unset $1__$2" |
|
27 |
} |
|
28 |
|
|
29 |
map_del() { |
|
30 |
eval "$(map_del_instr "$@")" |
|
31 |
} |
|
32 |
|
|
33 |
sanitize() { |
|
34 |
echo "$1" | tr /.- _ |
|
35 |
} |
|
6 |
. ./shell_utils.sh |
|
36 | 7 |
|
37 | 8 |
handle_export_line() { |
38 | 9 |
if [ "x$1" = "xEXPORTS_START" ]; then |
... | ... | |
259 | 230 |
s^_CONTENTSCRIPTS_^$CONTENTSCRIPTS^" \ |
260 | 231 |
< manifest.json > $BUILDDIR/manifest.json |
261 | 232 |
|
262 |
sed "s^_POPUPSCRIPTS_^$POPUPSCRIPTS^" \ |
|
263 |
< html/display-panel.html > $BUILDDIR/html/display-panel.html |
|
233 |
./process_html_file.sh html/display-panel.html | |
|
234 |
sed "s^_POPUPSCRIPTS_^$POPUPSCRIPTS^" \ |
|
235 |
> $BUILDDIR/html/display-panel.html |
|
264 | 236 |
|
265 |
sed "s^_OPTIONSSCRIPTS_^$OPTIONSSCRIPTS^" \ |
|
266 |
< html/options.html > $BUILDDIR/html/options.html |
|
237 |
./process_html_file.sh html/options.html | |
|
238 |
sed "s^_OPTIONSSCRIPTS_^$OPTIONSSCRIPTS^" \ |
|
239 |
> $BUILDDIR/html/options.html |
|
267 | 240 |
|
268 | 241 |
for FILE in $SCRIPTS; do |
269 | 242 |
FILEKEY=$(sanitize "$FILE") |
Also available in: Unified diff
enable modularization of html files