~qeef/damn-client.js

98de6c0c14d2273e694aacb2cb73be8b626b5ea9 — Jiri Vlasak 3 months ago 80b9ccb v0.20.1
Fix gen script
1 files changed, 4 insertions(+), 0 deletions(-)

M gen_static_js_client.sh
M gen_static_js_client.sh => gen_static_js_client.sh +4 -0
@@ 6,6 6,7 @@ then
fi
serv="https://${DAMN_SERVER:-server.damn-project.org}"
osmsm="https://${DAMN_OSMSM:-osmsm.damn-project.org}"
wschat="wss://${DAMN_CHAT:-chat.damn-project.org}"
lang=${DEFAULT_LANG:-en}
edit=${DEFAULT_WEB_EDITOR:-id}
area=$1


@@ 25,6 26,7 @@ cat static/index.html \
    | sed '/<script src="panel-area.js"><\/script>/d' \
    | sed '/<script src="mappy-area.js"><\/script>/d' \
    | sed '/<script src="light-stats.js"><\/script>/d' \
    | sed '/<script src="chat.js"><\/script>/d' \
    | sed '/<script>/ r static/damn-api.js' \
    | sed '/<script>/ r static/i18n.js' \
    | sed '/<script>/ r static/fn.js' \


@@ 34,8 36,10 @@ cat static/index.html \
    | sed '/<script>/ r static/panel-area.js' \
    | sed '/<script>/ r static/mappy-area.js' \
    | sed '/<script>/ r static/light-stats.js' \
    | sed '/<script>/ r static/chat.js' \
    | sed "s,https://server.damn-project.org,$serv,g" \
    | sed "s,https://osmsm.damn-project.org,$osmsm,g" \
    | sed "s,wss://chat.damn-project.org,$wschat,g" \
    | sed "s,var SHOW = \"area\";,var SHOW = \"$area\";," \
    | sed "s,var LANG = \"en\";,var LANG = \"$lang\";," \
    | sed "s,var EDIT = \"id\";,var EDIT = \"$edit\";,"