From 10b8c5e0a3fe882d34474f80571172e089fc4df1 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Tue, 8 Sep 2020 19:55:48 +0200 Subject: [refactor] remove unused script --- branding/scripts/vendorize.py | 95 ------------------------------------------- 1 file changed, 95 deletions(-) delete mode 100755 branding/scripts/vendorize.py (limited to 'branding/scripts') diff --git a/branding/scripts/vendorize.py b/branding/scripts/vendorize.py deleted file mode 100755 index 28c5d2a..0000000 --- a/branding/scripts/vendorize.py +++ /dev/null @@ -1,95 +0,0 @@ -#!/usr/bin/env python3 - -# TODO: to be deprecated! use gen-providers-json.py instead - -import os -import sys - -from string import Template -import configparser - -from provider import getDefaultProvider -from provider import getProviderData - -OUTFILE = 'config.go' -INFILE = '../templates/bitmaskvpn/config.go' -CONFIGFILE = '../config/vendor.conf' -SCRIPT_NAME = 'vendorize' - - -def addCaData(data, configfile): - provider = data.get('name').lower() - folder, f = os.path.split(configfile) - caFile = os.path.join(folder, provider + '-ca.crt') - if not os.path.isfile(caFile): - bail('[!] Cannot find CA file in {path}'.format(path=caFile)) - with open(caFile) as ca: - data['caCertString'] = ca.read().strip() - - -def writeOutput(data, infile, outfile): - - with open(infile) as infile: - s = Template(infile.read()) - - with open(outfile, 'w') as outf: - outf.write(s.substitute(data)) - - -def bail(msg=None): - if not msg: - print('Usage: {scriptname}.py