Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- submit also queryconfig, fixes package build
- Loading branch information
1 parent
b80fdf6
commit 8883068
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/usr/bin/perl -w | ||
|
||
BEGIN { | ||
unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/lib/build'); | ||
} | ||
|
||
use strict; | ||
|
||
use Build; | ||
|
||
my ($dist, $archs, $configdir, $debug); | ||
|
||
while (@ARGV) { | ||
if ($ARGV[0] eq '--dist') { | ||
shift @ARGV; | ||
$dist = shift @ARGV; | ||
next; | ||
} | ||
if ($ARGV[0] eq '--archpath') { | ||
shift @ARGV; | ||
$archs = shift @ARGV; | ||
next; | ||
} | ||
if ($ARGV[0] eq '--configdir') { | ||
shift @ARGV; | ||
$configdir = shift @ARGV; | ||
next; | ||
} | ||
last; | ||
} | ||
|
||
my $cf = Build::read_config_dist($dist, $archs, $configdir); | ||
die("Unable to read config\n") unless $cf; | ||
|
||
my $type = shift @ARGV; | ||
if ($type eq 'buildflags') { | ||
my $argument = shift @ARGV; | ||
die("Specify which buildflag to query\n") unless $argument; | ||
|
||
my $result = $cf->{"buildflags:$argument"}; | ||
print "$result\n" if defined $result; | ||
} else { | ||
die("unsupported query type: $type\n"); | ||
} | ||
|
||
exit(0); | ||
|