diff options
author | kali <kali@leap.se> | 2020-09-30 16:25:27 +0200 |
---|---|---|
committer | Ruben Pollan <meskio@sindominio.net> | 2020-10-13 19:08:44 +0200 |
commit | ef892643df8970aec45dbc3f48eabb95a1ccbf22 (patch) | |
tree | 1a20c34cca7b94e69468e471790996fa61909805 /branding/scripts | |
parent | 47ac0543b9ed2d4afb8814a19e2f4dc3c30030e1 (diff) |
[pkg] osx helper and working qt installer
Diffstat (limited to 'branding/scripts')
-rw-r--r-- | branding/scripts/gen-providers-json.py | 1 | ||||
-rwxr-xr-x | branding/scripts/getparam | 36 |
2 files changed, 37 insertions, 0 deletions
diff --git a/branding/scripts/gen-providers-json.py b/branding/scripts/gen-providers-json.py index beef3fe..c89217a 100644 --- a/branding/scripts/gen-providers-json.py +++ b/branding/scripts/gen-providers-json.py @@ -1,4 +1,5 @@ #!/usr/bin/env python3 + import configparser import json import os diff --git a/branding/scripts/getparam b/branding/scripts/getparam new file mode 100755 index 0000000..2b87e1e --- /dev/null +++ b/branding/scripts/getparam @@ -0,0 +1,36 @@ +#!/usr/bin/env python3 + +# A short utility to get appname in compilation time. +# This is a convenience to build helpers while we move the branding mechanism to a separate repo. + +import configparser + +import os +import sys + +from provider import getDefaultProvider +from provider import getProviderData + +def getData(): + here = os.path.abspath(os.path.dirname(__file__)) + configPath = os.path.join(here, '../../branding/config/vendor.conf') + if not os.path.isfile(configPath): + print("ERROR: path does not exist", config) + os.exit(1) + config = configparser.ConfigParser() + config.read(configPath) + defaultProvider = getDefaultProvider(config) + return getProviderData(getDefaultProvider(config), config) + +if __name__ == "__main__": + param = sys.argv[1] + if param == "appname": + field = "applicationName" + elif param == "binname": + field = "binaryName" + else: + print("ERROR: unknown param") + sys.exit(1) + + data = getData() + print(data[field]) |