buildsys: abi-generate: add usage output
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
193a77caa9
commit
a74fe23cf8
9
debian/scripts/abi-generate
vendored
9
debian/scripts/abi-generate
vendored
@ -4,8 +4,12 @@ use PVE::Tools;
|
||||
|
||||
use IO::File;
|
||||
|
||||
my $input_file = shift;
|
||||
my $output_file = shift;
|
||||
sub usage {
|
||||
die "USAGE: $0 INFILE OUTFILE [ABI INFILE-IS-DEB]\n";
|
||||
}
|
||||
|
||||
my $input_file = shift // usage();
|
||||
my $output_file = shift // usage();
|
||||
my $abi = shift;
|
||||
my $extract_deb = shift;
|
||||
|
||||
@ -14,6 +18,7 @@ die "input file '$input_file' does not exist\n" if ! -e $input_file;
|
||||
my $modules_symver_fh;
|
||||
|
||||
if ($extract_deb) {
|
||||
usage() if !defined($abi);
|
||||
my $cmd = [];
|
||||
push @$cmd, ['dpkg', '--fsys-tarfile', $input_file];
|
||||
push @$cmd, ['tar', '-xOf', '-', "./usr/src/linux-headers-${abi}/Module.symvers"];
|
||||
|
Loading…
Reference in New Issue
Block a user