From a74fe23cf8834e2e644aaea408e3f870fe7f74b4 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Fri, 25 May 2018 13:20:12 +0200 Subject: [PATCH] buildsys: abi-generate: add usage output Signed-off-by: Thomas Lamprecht --- debian/scripts/abi-generate | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/debian/scripts/abi-generate b/debian/scripts/abi-generate index 44704fb..c4a26bf 100755 --- a/debian/scripts/abi-generate +++ b/debian/scripts/abi-generate @@ -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"]; -- 2.39.2