Browse Source

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>
Markus Heiser 5 years ago
parent
commit
442b27ac1b
3 changed files with 20 additions and 0 deletions
  1. 7 0
      Makefile
  2. 8 0
      manage.sh
  3. 5 0
      utils/brand.env

+ 7 - 0
Makefile

@@ -97,6 +97,13 @@ searx.brand:
 	$(Q)echo "SEARX_URL = '$(SEARX_URL)'" >> searx/brand.py
 	$(Q)echo "SEARX_URL = '$(SEARX_URL)'" >> searx/brand.py
 	$(Q)echo "DOCS_URL = '$(DOCS_URL)'" >> searx/brand.py
 	$(Q)echo "DOCS_URL = '$(DOCS_URL)'" >> searx/brand.py
 	$(Q)echo "PUBLIC_INSTANCES = 'https://searx.space'" >> searx/brand.py
 	$(Q)echo "PUBLIC_INSTANCES = 'https://searx.space'" >> searx/brand.py
+	$(Q)echo "build utils/brand.env"
+	$(Q)echo "export GIT_URL='$(GIT_URL)'"  > utils/brand.env
+	$(Q)echo "export ISSUE_URL='https://github.com/asciimoo/searx/issues'" >> utils/brand.env
+	$(Q)echo "export SEARX_URL='$(SEARX_URL)'" >> utils/brand.env
+	$(Q)echo "export DOCS_URL='$(DOCS_URL)'" >> utils/brand.env
+	$(Q)echo "export PUBLIC_INSTANCES='https://searx.space'" >> utils/brand.env
+
 
 
 # node / npm
 # node / npm
 # ----------
 # ----------

+ 8 - 0
manage.sh

@@ -10,6 +10,7 @@ PYTHONPATH="$BASE_DIR"
 SEARX_DIR="$BASE_DIR/searx"
 SEARX_DIR="$BASE_DIR/searx"
 ACTION="$1"
 ACTION="$1"
 
 
+. "${BASE_DIR}/utils/brand.env"
 
 
 #
 #
 # Python
 # Python
@@ -186,6 +187,13 @@ Commands
     Build
     Build
     -----
     -----
     locales              - Compile locales
     locales              - Compile locales
+
+Environment:
+    GIT_URL:          ${GIT_URL}
+    ISSUE_URL:        ${ISSUE_URL}
+    SEARX_URL:        ${SEARX_URL}
+    DOCS_URL:         ${DOCS_URL}
+    PUBLIC_INSTANCES: ${PUBLIC_INSTANCES}
 "
 "
 }
 }
 
 

+ 5 - 0
utils/brand.env

@@ -0,0 +1,5 @@
+export GIT_URL='https://github.com/asciimoo/searx'
+export ISSUE_URL='https://github.com/asciimoo/searx/issues'
+export SEARX_URL='https://searx.me'
+export DOCS_URL='https://asciimoo.github.io/searx'
+export PUBLIC_INSTANCES='https://searx.space'