diff options
author | VG <vg@devys.org> | 2016-11-10 00:26:39 +0100 |
---|---|---|
committer | VG <vg@devys.org> | 2016-11-10 00:26:39 +0100 |
commit | 374a86b3a168293dc1ea7896d9a13921f4d8e332 (patch) | |
tree | 2413fad5a8b88259704509cfab95f3630cb1863d | |
parent | d6833ec9ee2be3a94970bdf3bfbcaf3c610effa9 (diff) | |
download | debootstrap-scripts-374a86b3a168293dc1ea7896d9a13921f4d8e332.tar.gz debootstrap-scripts-374a86b3a168293dc1ea7896d9a13921f4d8e332.tar.bz2 debootstrap-scripts-374a86b3a168293dc1ea7896d9a13921f4d8e332.zip |
use rsync instead of complex native copy/copytree
-rwxr-xr-x | rpi2-debian-stdkernel/copy-to-sdcard.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/rpi2-debian-stdkernel/copy-to-sdcard.py b/rpi2-debian-stdkernel/copy-to-sdcard.py index bb2c652..9b6805f 100755 --- a/rpi2-debian-stdkernel/copy-to-sdcard.py +++ b/rpi2-debian-stdkernel/copy-to-sdcard.py @@ -40,12 +40,8 @@ def get_fresh_firmware(firmware_dir): def copy_to_boot(firmware_dir, boot_mountpoint): - for path in glob.glob(firmware_dir + '/boot/*'): - if os.path.isfile(path): - shutil.copy(path, boot_mountpoint) - elif os.path.isdir(path): - shutil.copytree(path, boot_mountpoint + '/' - + os.path.basename(path.rstrip('/'))) + run(['rsync', '-aHX', join(firmware_dir, 'boot/.'), + join(boot_mountpoint, '.')], check=True) shutil.copy('files/cmdline.txt', boot_mountpoint) shutil.copy('files/config.txt', boot_mountpoint) shutil.copy('debootstrapdir/vmlinuz', join(boot_mountpoint, 'vmlinuz'), |