]> git.proxmox.com Git - pve-kernel.git/commitdiff
abi-generate: abi parameter only needed if we parse deb
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 25 May 2018 13:09:46 +0000 (15:09 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 25 May 2018 13:09:52 +0000 (15:09 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
debian/scripts/abi-generate

index a4df443ba643e2871987a965ce44f3d42a100bda..c4a26bfb8f720cfed6f9c89eaeca955215deb038 100755 (executable)
@@ -5,12 +5,12 @@ use PVE::Tools;
 use IO::File;
 
 sub usage {
-    die "USAGE: $0 INFILE OUTFILE ABI [INFILE-IS-DEB]\n";
+    die "USAGE: $0 INFILE OUTFILE [ABI INFILE-IS-DEB]\n";
 }
 
 my $input_file = shift // usage();
 my $output_file = shift // usage();
-my $abi = shift // usage();
+my $abi = shift;
 my $extract_deb = shift;
 
 die "input file '$input_file' does not exist\n" if ! -e $input_file;
@@ -18,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"];