def install_rootfs(remove=False): src = orig_rootdir() dest = usb_rootdir() if remove: rmdir(str(dest)) if not dest.isdir(): dest.makedirs() cmd = ['cp', '-al', str(src), str(dest.dirname())] subprocess.check_call(cmd)
def remove_bootdir(): bootdir = '%s/' % usb_bootdir() rmdir(bootdir)
def remove_bootdir(machine, arch): bootdir = '%s/' % usb_bootdir(machine, arch) rmdir(bootdir)