imgutils: allow mksquashfs to use its default compression

This commit is contained in:
Will Woods 2011-07-20 16:42:06 -04:00
parent baa791ad13
commit 7f087ead73

View File

@ -46,10 +46,11 @@ def mkcpio(rootdir, outfile, compression="xz", compressargs=["-9"]):
comp.wait() comp.wait()
return comp.returncode return comp.returncode
def mksquashfs(rootdir, outfile, compression="xz", compressargs=[]): def mksquashfs(rootdir, outfile, compression="default", compressargs=[]):
'''Make a squashfs image containing the given rootdir.''' '''Make a squashfs image containing the given rootdir.'''
return call(["mksquashfs", rootdir, outfile, if compression != "default":
"-comp", compression] + compressargs) compressargs = ["-comp", compression] + compressargs
return call(["mksquashfs", rootdir, outfile] + compressargs)
######## Utility functions ############################################### ######## Utility functions ###############################################