Changeset 18 in ProjectBuilder for devel/pb/bin
- Timestamp:
- Jul 31, 2007, 12:50:36 AM (18 years ago)
- Location:
- devel/pb/bin
- Files:
-
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb/bin/pb.pl
r17 r18 10 10 # Syntax: pb [-p project] <action> [<params>...] 11 11 12 use strict ;12 use strict 'vars'; 13 13 use Switch; 14 14 use Getopt::Std; … … 21 21 use POSIX qw(strftime); 22 22 23 use vars qw (%defpkgdir %extpkgdir %version %confparam %filteredfiles); 23 24 use lib qw (lib); 24 use vars qw (%defpkgdir %extpkgdir %version %param %filteredfiles);25 25 use common qw (env_init); 26 use pb qw ( defpkgdir extpkgdir version param filteredfilespb_init);26 use pb qw (pb_init); 27 27 use distro qw (distro_init); 28 28 use cms; … … 70 70 } elsif ($ARGV[0] =~ /^all$/) { 71 71 @pkgs = keys %defpkgdir; 72 push(@pkgs, keys %extpkgdir); 72 if (defined %extpkgdir) { 73 my $k = keys %extpkgdir; 74 if (defined $k) { 75 push(@pkgs, keys %extpkgdir); 76 } 77 } 73 78 } else { 74 79 @pkgs = @ARGV; … … 231 236 } 232 237 } 233 # Prepare the dest directory for archive 234 if (-x "$ENV{'PBCONF'}/$pkg/pbpkginit") { 235 system("cd $dest ; $ENV{'PBCONF'}/$pkg/pbinit"); 236 if ($? == -1) { 237 print "failed to execute: $!\n"; 238 } elsif ($? & 127) { 239 printf "child died with signal %d, %s coredump\n", ($? & 127), ($? & 128) ? 'with' : 'without'; 240 } else { 241 print " $dest\n"; 242 } 243 } 244 # Archive dest dir 245 chdir "$dest/.."; 246 print "Creating $pkg tar files (gzip... "; 247 system("tar cfphz $pkg-$pbver.tar.gz $pkg-$pbver"); 238 } 239 close(D); 240 # Prepare the dest directory for archive 241 if (-x "$ENV{'PBCONF'}/$pkg/pbpkginit") { 242 system("cd $dest ; $ENV{'PBCONF'}/$pkg/pbinit"); 248 243 if ($? == -1) { 249 244 print "failed to execute: $!\n"; … … 251 246 printf "child died with signal %d, %s coredump\n", ($? & 127), ($? & 128) ? 'with' : 'without'; 252 247 } else { 253 print " OK)\n"; 254 print "Under $dest/../$pkg-$pbver.tar.gz\n"; 255 } 256 } 257 close(D); 248 print " $dest\n"; 249 } 250 } 251 # Archive dest dir 252 chdir "$dest/.."; 253 print "Creating $pkg tar files (gzip... "; 254 system("tar cfphz $pkg-$pbver.tar.gz $pkg-$pbver"); 255 if ($? == -1) { 256 print "failed to execute: $!\n"; 257 } elsif ($? & 127) { 258 printf "child died with signal %d, %s coredump\n", ($? & 127), ($? & 128) ? 'with' : 'without'; 259 } else { 260 print " OK)\n"; 261 print "Under $dest/../$pkg-$pbver.tar.gz\n"; 262 } 258 263 } 259 264 } else { … … 290 295 # special case for ChangeLog 291 296 } elsif (($tmp =~ /^yes$/) && ($s =~ /^PBLOG$/)) { 292 $tmp = changelog($dtype, $pkg, $pbtag, $dsuf, \*DEST); 297 my $p = $defpkgdir{$pkg}; 298 $p = $extpkgdir{$pkg} if (not defined $p); 299 $tmp = changelog($dtype, $pkg, $pbtag, $dsuf, $p, \*DEST); 293 300 } 294 301 $line =~ s|$s|$tmp|;
Note:
See TracChangeset
for help on using the changeset viewer.