1# SPDX-License-Identifier: AGPL-3.0-or-later
2"""build environment used by shell scripts
8from os.path import realpath, dirname, join, sep, abspath
10repo_root = realpath(dirname(realpath(__file__)) + sep + '..')
11sys.path.insert(0, repo_root)
12os.environ['SEARX_SETTINGS_PATH'] = abspath(dirname(__file__) + '/settings.yml')
14# Under the assumption that a brand is always a fork assure that the settings
15# file from reposetorie's working tree is used to generate the build_env, not
16# from /etc/searx/settings.yml.
17os.environ['SEARX_SETTINGS_PATH'] = abspath(dirname(__file__) + sep + 'settings.yml')
19from searx import brand
22 ('SEARX_URL' , brand.SEARX_URL),
23 ('GIT_URL' , brand.GIT_URL),
24 ('GIT_BRANCH' , brand.GIT_BRANCH),
25 ('ISSUE_URL' , brand.ISSUE_URL),
26 ('DOCS_URL' , brand.DOCS_URL),
27 ('PUBLIC_INSTANCES' , brand.PUBLIC_INSTANCES),
28 ('CONTACT_URL' , brand.CONTACT_URL),
29 ('WIKI_URL' , brand.WIKI_URL),
30 ('TWITTER_URL' , brand.TWITTER_URL),
33brand_env = 'utils' + sep + 'brand.env'
35print('build %s' % brand_env)
36with open(repo_root + sep + brand_env, 'w', encoding='utf-8') as f:
37 for name, val in name_val:
38 print("export %s='%s'" % (name, val), file=f)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list