rwx
This commit is contained in:
parent
778f43dadc
commit
508872059a
13 changed files with 1 additions and 4 deletions
15
rwx/cmd/__init__.py
Normal file
15
rwx/cmd/__init__.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
commands: list[str] = []
|
||||
packages: list[str] = []
|
||||
|
||||
|
||||
def need(command: str) -> None:
|
||||
match command:
|
||||
case 'debootstrap':
|
||||
package = 'debootstrap'
|
||||
case 'mksquashfs' | 'unsquashfs':
|
||||
package = 'squashfs-tools'
|
||||
case _:
|
||||
package = None
|
||||
if package:
|
||||
if package not in packages:
|
||||
packages.append(package)
|
14
rwx/cmd/squashfs/__init__.py
Normal file
14
rwx/cmd/squashfs/__init__.py
Normal file
|
@ -0,0 +1,14 @@
|
|||
import cmd
|
||||
import ps
|
||||
|
||||
cmd.need('mksquashfs')
|
||||
|
||||
|
||||
def mksquashfs(input_root: str, output_file: str):
|
||||
ps.run([
|
||||
'mksquashfs',
|
||||
input_root,
|
||||
output_file,
|
||||
'-comp', 'zstd',
|
||||
'-Xcompression-level', str(18),
|
||||
])
|
Loading…
Add table
Add a link
Reference in a new issue