Files
linux-kernel-module-cheat/copy-overlay
Ciro Santilli 六四事件 法轮功 a5ec63dc28 CliFunction
2019-01-22 00:00:00 +00:00

31 lines
833 B
Python
Executable File

#!/usr/bin/env python3
import distutils.dir_util
import os
import shutil
import common
from shell_helpers import LF
class Main(common.BuildCliFunction):
def __init__(self):
super().__init__(
description='''\
Copy our git tracked rootfs_overlay to the final generated rootfs_overlay
that also contains generated build outputs. This has the following advantages
over just adding that to BR2_ROOTFS_OVERLAY:
- also works for non Buildroot root filesystesms
- places everything in one place for a nice 9P mount
''')
def build(self):
# TODO: print rsync equivalent, move into shell_helpers.
distutils.dir_util.copy_tree(
self.env['rootfs_overlay_dir'],
self.env['out_rootfs_overlay_dir'],
update=1,
)
if __name__ == '__main__':
Main().cli()