make sure genext2fs and genext2fs exist for the respective formats

This commit is contained in:
Johannes Schauer Marin Rodrigues 2022-12-21 20:02:56 +01:00
parent 374ae3dc99
commit 830270840b
Signed by: josch
GPG key ID: F2CBA5C78FBD83E1

View file

@ -5426,6 +5426,16 @@ sub main() {
info "ignoring target $options->{target} with null format"; info "ignoring target $options->{target} with null format";
} }
if ($format eq 'ext2') {
if (!can_execute 'genext2fs') {
error "need genext2fs for ext2 format";
}
} elsif ($format eq 'squashfs') {
if (!can_execute 'tar2sqfs') {
error "need tar2sqfs binary from the squashfs-tools-ng package";
}
}
if (any { $_ eq $format } ('tar', 'squashfs', 'ext2', 'null')) { if (any { $_ eq $format } ('tar', 'squashfs', 'ext2', 'null')) {
if ($format ne 'null') { if ($format ne 'null') {
if (any { $_ eq $options->{variant} } ('extract', 'custom') if (any { $_ eq $options->{variant} } ('extract', 'custom')