File size: 394 Bytes
34292e0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env python3

import os
import yaml

dir_path = os.path.dirname(os.path.realpath(__file__))

yaml_path = os.path.join(dir_path, "variables.yaml")
with open(yaml_path, "r") as file:
    data = yaml.safe_load(file)

for key, value in data.items():
    if value.get("default", None) is None:
        continue
    print(f'export {key}?={str(value["default"]).replace(" ", "__SPACE__")}')