# Check a debian description file
minimae -i file.dsc
- # Check a binary .deb
- minimae -b package_name.deb
+ # Check a deb
+ minimae -i file.deb
=cut
'help' => \$help,
'verbose' => \$verbose,
'inputfile|i=s' => \$inputfile,
- 'binary|b' => \&record_pkgmode,
);
-# Record what type of data is specified
-# Options: -b|--binary, -s|--source, --udeb
-sub record_pkgmode {
- print "in record_pkgmode\n";
- $pkg_mode = 'b' if $_[0] eq 'binary';
- $pkg_mode = 's' if $_[0] eq 'source';
- $pkg_mode = 'u' if $_[0] eq 'udeb';
-}
-
-
# --- Process Command line options
pod2usage(1) if $help;
# We push the entire file into an array
# If the file is signed, the sig is separated by a blank line
my @control = slurp $file, { irs => qr/\n\n/xms };
- my @lines = split /\n/, $control[1];
+ my @lines;
+ if ($#control > 1) {
+ @lines = split /\n/, $control[1];
+ }
+ else {
+ @lines = split /\n/, $control[0];
+ }
print map { $_ } grep /Maintainer/, @lines;
}