on master help sign in
bash: use build environment from Makefile

To Makefile target brand, add creation of bash environment in:: utils/brand.env In bash scripts (manage.sh) source env by:: . utils/brand.env manage.sh help: show GIT_URL and more environment Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>

commit442b27ac1b1f54669fbb9785d780327f62814431 authorMarkus Heiser <markus.heiser@darmarit.de> dateSun 29 Mar 2020, 11:41 (7 years ago) parent8a16903
3 files changed+20
Makefile+7 manage.sh+8 utils/brand.env+5
Makefile+7
@@ -97,6 +97,13 @@ searx.brand:
9797 $(Q)echo "SEARX_URL = '$(SEARX_URL)'" >> searx/brand.py
9898 $(Q)echo "DOCS_URL = '$(DOCS_URL)'" >> searx/brand.py
9999 $(Q)echo "PUBLIC_INSTANCES = 'https://searx.space'" >> searx/brand.py
100+ $(Q)echo "build utils/brand.env"
101+ $(Q)echo "export GIT_URL='$(GIT_URL)'" > utils/brand.env
102+ $(Q)echo "export ISSUE_URL='https://github.com/asciimoo/searx/issues'" >> utils/brand.env
103+ $(Q)echo "export SEARX_URL='$(SEARX_URL)'" >> utils/brand.env
104+ $(Q)echo "export DOCS_URL='$(DOCS_URL)'" >> utils/brand.env
105+ $(Q)echo "export PUBLIC_INSTANCES='https://searx.space'" >> utils/brand.env
106+
100107
101108# node / npm
102109# ----------
manage.sh+8
@@ -10,6 +10,7 @@ PYTHONPATH="$BASE_DIR"
1010SEARX_DIR="$BASE_DIR/searx"
1111ACTION="$1"
1212
13+. "${BASE_DIR}/utils/brand.env"
1314
1415#
1516# Python
@@ -186,6 +187,13 @@ Commands
186187 Build
187188 -----
188189 locales - Compile locales
190+
191+Environment:
192+ GIT_URL: ${GIT_URL}
193+ ISSUE_URL: ${ISSUE_URL}
194+ SEARX_URL: ${SEARX_URL}
195+ DOCS_URL: ${DOCS_URL}
196+ PUBLIC_INSTANCES: ${PUBLIC_INSTANCES}
189197"
190198}
191199
utils/brand.envnew file+5
@@ -0,0 +1,5 @@
1+export GIT_URL='https://github.com/asciimoo/searx'
2+export ISSUE_URL='https://github.com/asciimoo/searx/issues'
3+export SEARX_URL='https://searx.me'
4+export DOCS_URL='https://asciimoo.github.io/searx'
5+export PUBLIC_INSTANCES='https://searx.space'