
Makes the Makefile easier to write and the output a little nicer. Inspired by a similar tool ;-)
19 lines
382 B
Python
Executable File
19 lines
382 B
Python
Executable File
#!/usr/bin/env python3
|
|
"""Copy files from source to target in the chroot"""
|
|
import os
|
|
import subprocess
|
|
import sys
|
|
|
|
|
|
def main():
|
|
chroot = os.environ["CHROOT"]
|
|
target = sys.argv[-1]
|
|
chroot_target = os.path.join(chroot, target.lstrip('/'))
|
|
command = ["cp"] + sys.argv[1:-1] + [chroot_target]
|
|
|
|
subprocess.check_call(command)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|