mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
build-gem5: factor dtb copy with copy_dir_if_update_non_recursive
Less code, less boring + cp prints, only copy if modified.
This commit is contained in:
@@ -170,6 +170,7 @@ def write_string_to_file(path, string, mode='w'):
|
||||
f.write(string)
|
||||
|
||||
def copy_dir_if_update_non_recursive(srcdir, destdir, filter_ext=None):
|
||||
# TODO print rsync equivalent.
|
||||
os.makedirs(destdir, exist_ok=True)
|
||||
for basename in os.listdir(srcdir):
|
||||
src = os.path.join(srcdir, basename)
|
||||
|
||||
Reference in New Issue
Block a user