doc/cmd
This commit is contained in:
parent
012b10f7d5
commit
b9754b5dde
2 changed files with 17 additions and 5 deletions
|
@ -5,7 +5,11 @@ packages: list[str] = []
|
||||||
|
|
||||||
|
|
||||||
def need(command: str) -> None:
|
def need(command: str) -> None:
|
||||||
"""Assert package dependency for a command."""
|
"""Assert package dependency for a command.
|
||||||
|
|
||||||
|
:param command: name of the requested command
|
||||||
|
:type command: str
|
||||||
|
"""
|
||||||
package: str | None
|
package: str | None
|
||||||
match command:
|
match command:
|
||||||
case "debootstrap":
|
case "debootstrap":
|
||||||
|
|
|
@ -1,16 +1,24 @@
|
||||||
"""Wrap SquashFS commands."""
|
"""Wrap SquashFS commands."""
|
||||||
|
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
from rwx import cmd, ps
|
from rwx import cmd, ps
|
||||||
|
|
||||||
cmd.need("mksquashfs")
|
cmd.need("mksquashfs")
|
||||||
|
|
||||||
|
|
||||||
def mksquashfs(input_root: str, output_file: str) -> None:
|
def mksquashfs(input_root: Path, output_file: Path) -> None:
|
||||||
"""Make a SquashFS bootable image file."""
|
"""Make a SquashFS bootable image file.
|
||||||
|
|
||||||
|
:param input_root: ?
|
||||||
|
:type input_root: Path
|
||||||
|
:param output_file: ?
|
||||||
|
:type output_file: Path
|
||||||
|
"""
|
||||||
ps.run(
|
ps.run(
|
||||||
"mksquashfs",
|
"mksquashfs",
|
||||||
input_root,
|
str(input_root),
|
||||||
output_file,
|
str(output_file),
|
||||||
"-comp",
|
"-comp",
|
||||||
"zstd",
|
"zstd",
|
||||||
"-Xcompression-level",
|
"-Xcompression-level",
|
||||||
|
|
Loading…
Reference in a new issue