-rwxr-xr-x 396 libcpucycles-20260901/autogen/wrapper-version raw
#!/usr/bin/env python3 import os import re def save(fn,x): if os.path.exists(fn): with open(fn) as f: cur = f.read() if cur == x: return with open(fn,'w') as f: f.write(x) with open('version') as f: version = f.read().strip() with open('cpucycles/wrapper.c') as f: x = f.read() x = re.sub('return "[0-9]*";',f'return "{version}";',x) save('cpucycles/wrapper.c',x)