forked from Mirror/pmbootstrap
Alias: "pmbootstrap export" for "pmbootstrap flasher export" (#417)
* moved export code to pmb/export and split it up * added deprecation notice to "pmbootstrap flasher export" * made "pmbootstrap export" work * adjusted the "pmbootstrap flasher export" hints in the code
This commit is contained in:
parent
cd9baf4026
commit
b29cc877a7
9 changed files with 164 additions and 96 deletions
30
pmb/export/frontend.py
Normal file
30
pmb/export/frontend.py
Normal file
|
@ -0,0 +1,30 @@
|
|||
import logging
|
||||
import os
|
||||
|
||||
import pmb.helpers.run
|
||||
import pmb.helpers.frontend
|
||||
import pmb.chroot.initfs
|
||||
import pmb.export
|
||||
|
||||
|
||||
def frontend(args):
|
||||
# Create the export folder
|
||||
target = args.export_folder
|
||||
if not os.path.exists(target):
|
||||
pmb.helpers.run.user(args, ["mkdir", "-p", target])
|
||||
|
||||
# System image note
|
||||
img_path = "/home/user/rootfs/" + args.device + ".img"
|
||||
if not os.path.exists(args.work + "/chroot_native" + img_path):
|
||||
logging.info("NOTE: To export the system image, run 'pmbootstrap"
|
||||
" install' first (without the 'sdcard' parameter).")
|
||||
|
||||
# Rebuild the initramfs, just to make sure (see #69)
|
||||
flavor = pmb.helpers.frontend._parse_flavor(args)
|
||||
pmb.chroot.initfs.build(args, flavor, "rootfs_" + args.device)
|
||||
|
||||
# Do the export, print all files
|
||||
logging.info("Export symlinks to: " + target)
|
||||
if args.odin_flashable_tar:
|
||||
pmb.export.odin(args, flavor, target)
|
||||
pmb.export.symlinks(args, flavor, target)
|
Loading…
Add table
Add a link
Reference in a new issue