#!/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; } die("Usage: gettype --dist --archpath [--configdir ]\n") if @ARGV; my $cf = Build::read_config_dist($dist, $archs, $configdir); exit 0 unless $cf->{'binarytype'}; print "$cf->{'binarytype'}\n";