-rwxr-xr-x 430 cdb-20251021/configure raw
#!/usr/bin/env python3 import sys import os def setprefix(dir): with open('conf-home') as f: lines = f.readlines() with open('conf-home.tmp','w') as g: g.write(dir+'\n') for line in lines[1:]: g.write(line) os.rename('conf-home.tmp','conf-home') for arg in sys.argv[1:]: if arg.startswith('--prefix='): setprefix(arg[len('--prefix='):]) else: raise Exception(f'unrecognized argument {arg}')