aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh42
1 files changed, 8 insertions, 34 deletions
diff --git a/build.sh b/build.sh
index 60c1863..675dc2c 100755
--- a/build.sh
+++ b/build.sh
@@ -3,36 +3,7 @@
# Copyright (C) 2021 Wojtek Kosior
# Redistribution terms are gathered in the `copyright' file.
-ENDL="
-"
-
-errcho() {
- echo "$@" >&2
-}
-
-map_set_instr() {
- echo "$1__$2='$3'"
-}
-
-map_set() {
- eval "$(map_set_instr "$@")"
-}
-
-map_get() {
- eval "echo \"\$$1__$2\""
-}
-
-map_del_instr() {
- echo "unset $1__$2"
-}
-
-map_del() {
- eval "$(map_del_instr "$@")"
-}
-
-sanitize() {
- echo "$1" | tr /.- _
-}
+. ./shell_utils.sh
handle_export_line() {
if [ "x$1" = "xEXPORTS_START" ]; then
@@ -259,11 +230,13 @@ s^_BGSCRIPTS_^$BGSCRIPTS^
s^_CONTENTSCRIPTS_^$CONTENTSCRIPTS^" \
< manifest.json > $BUILDDIR/manifest.json
- sed "s^_POPUPSCRIPTS_^$POPUPSCRIPTS^" \
- < html/display-panel.html > $BUILDDIR/html/display-panel.html
+ ./process_html_file.sh html/display-panel.html |
+ sed "s^_POPUPSCRIPTS_^$POPUPSCRIPTS^" \
+ > $BUILDDIR/html/display-panel.html
- sed "s^_OPTIONSSCRIPTS_^$OPTIONSSCRIPTS^" \
- < html/options.html > $BUILDDIR/html/options.html
+ ./process_html_file.sh html/options.html |
+ sed "s^_OPTIONSSCRIPTS_^$OPTIONSSCRIPTS^" \
+ > $BUILDDIR/html/options.html
for FILE in $SCRIPTS; do
FILEKEY=$(sanitize "$FILE")
@@ -300,6 +273,7 @@ $(map_get EXPORTCODES $FILEKEY)
fi
cp -r copyright licenses/ $BUILDDIR
+ cp html/*.css $BUILDDIR/html
mkdir $BUILDDIR/icons
cp icons/*.png $BUILDDIR/icons
}