From b9754b5dde4ad682883f1ea7affabeb207c6a276 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Tue, 17 Sep 2024 21:32:08 +0200 Subject: [PATCH] doc/cmd --- rwx/cmd/__init__.py | 6 +++++- rwx/cmd/squashfs/__init__.py | 16 ++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/rwx/cmd/__init__.py b/rwx/cmd/__init__.py index ca4dced..be9e540 100644 --- a/rwx/cmd/__init__.py +++ b/rwx/cmd/__init__.py @@ -5,7 +5,11 @@ packages: list[str] = [] 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 match command: case "debootstrap": diff --git a/rwx/cmd/squashfs/__init__.py b/rwx/cmd/squashfs/__init__.py index db603da..b3ec864 100644 --- a/rwx/cmd/squashfs/__init__.py +++ b/rwx/cmd/squashfs/__init__.py @@ -1,16 +1,24 @@ """Wrap SquashFS commands.""" +from pathlib import Path + from rwx import cmd, ps cmd.need("mksquashfs") -def mksquashfs(input_root: str, output_file: str) -> None: - """Make a SquashFS bootable image file.""" +def mksquashfs(input_root: Path, output_file: Path) -> None: + """Make a SquashFS bootable image file. + + :param input_root: ? + :type input_root: Path + :param output_file: ? + :type output_file: Path + """ ps.run( "mksquashfs", - input_root, - output_file, + str(input_root), + str(output_file), "-comp", "zstd", "-Xcompression-level",