diff options
author | kali kaneko (leap communications) <kali@leap.se> | 2020-10-09 22:35:45 +0200 |
---|---|---|
committer | Ruben Pollan <meskio@sindominio.net> | 2020-10-13 19:08:59 +0200 |
commit | 481bd7db1d9c3937373c643d6d6aa3164b179839 (patch) | |
tree | d927d50290e4de77de625a80cf54aa327d7f60cf /branding/scripts/generate-debian.py | |
parent | aabd6d00acd34273902929bd02dbae47f10a96cc (diff) |
[pkg] some extra branding refactor
Diffstat (limited to 'branding/scripts/generate-debian.py')
-rwxr-xr-x | branding/scripts/generate-debian.py | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/branding/scripts/generate-debian.py b/branding/scripts/generate-debian.py deleted file mode 100755 index 56e533b..0000000 --- a/branding/scripts/generate-debian.py +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env python3 - -import json -import os -import sys - -import configparser - -from provider import getDefaultProvider -from provider import getProviderData - - -VERSION = os.environ.get('VERSION', 'unknown') -SCRIPT = 'generate-debian.py' - - -def writeOutput(data, outfile): - - with open(outfile, 'w') as outf: - outf.write(json.dumps(data)) - - -if __name__ == "__main__": - env_provider_conf = os.environ.get('PROVIDER_CONFIG') - if env_provider_conf: - if os.path.isfile(env_provider_conf): - print("[+] Overriding provider config per " - "PROVIDER_CONFIG variable") - configfile = env_provider_conf - - config = configparser.ConfigParser() - config.read(configfile) - provider = getDefaultProvider(config) - data = getProviderData(provider, config) - - if len(sys.argv) != 2: - print('Usage: {} <output_file>'.format(SCRIPT)) - sys.exit(1) - - outputf = sys.argv[1] - - data['version'] = VERSION - writeOutput(data, outputf) |