1
0
Fork 0
qemu/tests/lcitool/libvirt-ci/containers/cirrus-run/cirrus-vars.py
Daniel Baumann ea34ddeea6
Adding upstream version 1:10.0.2+ds.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-22 14:27:05 +02:00

19 lines
345 B
Python
Executable file

#!/usr/bin/env python3
import os
import re
import sys
var = re.compile(r'@([a-zA-Z0-9_]+)@')
# Return empty string if var is not set, since not all
# OS targets require all vars to be set.
def get_env(matchobj):
return os.environ.get(matchobj.group(1), '')
for line in sys.stdin:
print(var.sub(get_env, line), end='')
sys.exit(0)