diff options
author | Carsten Munk <carsten.munk@gmail.com> | 2012-02-24 10:36:17 +0100 |
---|---|---|
committer | Adrian Schröter <adrian@suse.de> | 2012-04-10 14:08:07 +0200 |
commit | 8bade085689ec3e9be5766dacc49fe57eb66bbd0 (patch) | |
tree | eac0dc87666789cb6e691f69f774975cc71e0131 /gettype | |
parent | 54b130169ee32648bbe6b751b401bf2fad938dba (diff) | |
download | build-8bade085689ec3e9be5766dacc49fe57eb66bbd0.tar.gz build-8bade085689ec3e9be5766dacc49fe57eb66bbd0.tar.bz2 build-8bade085689ec3e9be5766dacc49fe57eb66bbd0.zip |
Make it possible to specify Type: in prjconf and have non-rpm.rpm chroots
Signed-off-by: Carsten Munk <carsten.munk@gmail.com>
Conflicts:
init_buildsystem
Diffstat (limited to 'gettype')
-rwxr-xr-x | gettype | 36 |
1 files changed, 36 insertions, 0 deletions
@@ -0,0 +1,36 @@ +#!/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 <dist> --archpath <archpath> [--configdir <configdir>]\n") if @ARGV; + +my $cf = Build::read_config_dist($dist, $archs, $configdir); +exit 0 unless $cf->{'type'}; +print "$cf->{'type'}\n"; |