Changeset 6 in ProjectBuilder
- Timestamp:
- Jul 29, 2007, 1:21:40 AM (18 years ago)
- Location:
- devel/pb
- Files:
-
- 1 added
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb/bin/pb.pl
r5 r6 12 12 use Getopt::Std; 13 13 14 use lib qw (lib /etc/pb);15 use vars qw (%defpkgdir %extpkgdir %version);14 use lib qw (lib etc); 15 use vars qw (%defpkgdir %extpkgdir @version); 16 16 use common qw (set_env); 17 17 use pb qw (defpkgdir extpkgdir version pb_init); … … 30 30 31 31 print "PBPROJ: $ENV{'PBPROJ'}\n"; 32 33 cms_init(); -
devel/pb/lib/cms.pm
r5 r6 14 14 # Expects we are in the right directory to launch CMS commands 15 15 16 my @args = ("svn", "info", "2>&1", "/dev/null"); 16 sub cms_init { 17 17 18 my $ret; 18 system(@args) == 0 or die "system @args failed: $?"; 19 20 chdir "$ENV{'PBROOT'}"; 21 system("svn info 2>&1 /dev/null") == 0 or die "system svn info failed: $?"; 19 22 if ($? == -1) { 20 23 print "failed to execute: $!\n"; … … 24 27 $ret = $? >> 8; 25 28 if ($ret == 0) { 26 $ENV{'REVISION'}=`(cd $PBROOT/..; svnversion .)`;29 $ENV{'REVISION'}=`(cd "$ENV{'PBROOT'}/.." ; svnversion .)`; 27 30 $ENV{'CMSLOG'}="svn log"; 28 31 $ENV{'CMSEXP'}="svn export"; 29 32 } else { 30 33 # By default if not SVN take CVS 31 $ENV{'REVISION'}=`(cd $PBROOT/..; cvs rannotate -f . 2>&1 | awk '{print $1}' | grep -E '^[0-9]' | cut -d. -f2 |sort -nu | tail -1)`;34 $ENV{'REVISION'}=`(cd "$ENV{'PBROOT'}/.." ; cvs rannotate -f . 2>&1 | awk '{print $1}' | grep -E '^[0-9]' | cut -d. -f2 |sort -nu | tail -1)`; 32 35 $ENV{'CMSLOG'}="cvs log"; 33 36 $ENV{'CMSEXP'}="cvs export" 34 $ENV{'CVSROOT'}=$ENV{'CVSVAR'};35 37 } 36 38 } 39 } 37 40 1; -
devel/pb/lib/common.pm
r5 r6 10 10 11 11 use lib qw (lib); 12 use pb qw (pb_init); 12 13 use strict; 13 14 use File::Basename; 14 15 use ExtUtils::Command; 15 16 use File::Temp qw /tempdir/; 16 use vars qw (%defpkgdir %extpkgdir %version &pb_init);17 use vars qw (%defpkgdir %extpkgdir %version); 17 18 18 19 $ENV{'PBCONF'} = "/etc/pb"; … … 32 33 33 34 # Use project configuration file 34 require "$ENV{'PBCONF'}/$proj.pb"; 35 pb_init(); 35 pb_init("$ENV{'PBCONF'}/$proj.pb"); 36 36 37 37 # Check content
Note:
See TracChangeset
for help on using the changeset viewer.