source: ProjectBuilder/devel/pb/lib/pb.pm@ 6

Last change on this file since 6 was 6, checked in by Bruno Cornec, 17 years ago

Ok seems better interm of organization with AppConfig usage

File size: 1.1 KB
Line 
1#!/usr/bin/perl -w
2#
3# Project Builder configuration file
4# For project pb ;-)
5#
6# $Id$
7#
8use strict;
9use Exporter();
10use vars qw(@ISA @EXPORT_OK);
11@ISA = qw(Exporter);
12# global vars are here
13@EXPORT_OK = qw(%defpkgdir %extpkgdir @version &pb_init);
14use vars @EXPORT_OK;
15use AppConfig;
16
17sub pb_init {
18
19my $conffile = shift;
20
21my $config = AppConfig->new({
22 # Auto Create variables mentioned in Conf file
23 CREATE => 1,
24 DEBUG => 0,
25 GLOBAL => {
26 # Each conf item has one single parameter
27 ARGCOUNT => AppConfig::ARGCOUNT_ONE
28 }
29 });
30$config->file($conffile);
31
32# Root of the project to build
33# needs at least 2 levels of dir as in the upper
34# other dirs will be created and used
35$ENV{'PBROOT'} = $config->get("pbproj");
36
37# If CVS, gives the way to login
38$ENV{'CVSROOT'} = $config->get("cvsroot");
39
40# List of pkg to build by default
41%defpkgdir = $config->get("defpkgdir");
42
43# List of additional pkg to build when all is called
44%extpkgdir = $config->get("extpkgdir");
45
46# Valid version names
47@version = $config->get("version");
48
49}
501;
Note: See TracBrowser for help on using the repository browser.