2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-02-27 07:41:13 +00:00

Stub to drive unpack feature

This commit is contained in:
Jarrod Johnson 2021-08-09 16:47:27 -04:00
parent 225618ef75
commit 1e418e1bcf

View File

@ -569,6 +569,8 @@ def main():
exec_root(opts, args[1:])
elif args[0] == 'pack':
pack_image(opts, args[1:])
#elif args[0] == 'unpack':
#unpack_image(opts, args[1:])
else:
parser.print_usage()
@ -781,6 +783,14 @@ def build_root(opts, args):
pack_image(opts, args)
def unpack_image(opts, args):
scratchdir = args[1]
indir = args[0]
if os.path.isdir(indir):
indir = os.path.join(indir, 'rootimg.sfs')
#TODO: read header, if encrypted, then setup decryption to facilitate unpack
def pack_image(opts, args):
outdir = args[1]
if '/' in outdir: