1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
|
eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
& eval 'exec perl -S $0 $argv:q'
if 0;
# $Id$
#
# Creates an ACE or TAO kit. Intended to be called from the
# ACE or TAO top-level Makefiles.
#
# The first three lines above let this script run without specifying the
# full path to perl, as long as it is in the user's PATH.
# Taken from perlrun man page.
use strict;
my $usage="usage: $0 [-?] [-i] [-g] [-k <kit>] [-n] [-v <version>] " .
"[-ta <ACE tag>] [-tt <TAO tag>] " .
"[-c <controlled files>] [-r <release files>] [-l <release lib files] " .
"[-u] [-z]\n";
my $long_usage=" -? option prints this message\n" .
" -i to install to public web server directory\n" .
" -g to generate the man pages\n" .
" -k <kit>, where <kit> is ace, tao, or ace+tao\n" .
" -n option prints what would be done, but doesn't do it\n" .
" -v <version>, where <version> is major, minor, or beta (default)\n" .
" -ta <ACE tag>, to specify ACE tag to be use for checkout (export)\n" .
" -tt <TAO tag>, to specify TAO tag to be use for checkout (export)\n" .
" -c <controlled files> lists the CVS-controlled files\n" .
" -r <release files> lists the files to be released\n" .
" -l <release lib files> list the files to put in the lib kit\n" .
" -u to update versions\n" .
" -z to suppress creation of .zip files\n";
########
######## Sanity checks.
########
$ENV{'SIGNATURE'} ||
die "$0: must set your SIGNATURE environment variable\n";
my $hostname;
chomp ($hostname = $ENV{'HOSTNAME'} || `uname -n`);
unless ("$hostname" eq 'ace') {
#### For efficiency sake . . .
die "$0: must run on host ace\n";
}
if (! "$ENV{'CVSROOT'}") {
$ENV{'CVSROOT'} = '/project/cvs-repository';
}
if (! "$ENV{'ACE_ROOT'}") {
chop ($ENV{'ACE_ROOT'} = `/pkg/gnu/bin/pwd`);
}
########
######## Configuration parameters.
########
my $gnu;
if (-d '/pkg/gnu/bin') {
$gnu = '/pkg/gnu/bin/';
#### Insert it at head of PATH, so that cvs diff uses GNU diff.
$ENV{'PATH'} = "/pkg/gnu/bin:" . $ENV{'PATH'};
} else {
#### The default utilities had better be GNU.
$gnu = '';
}
#### Unconditionally insert this at the head of the path. We're
#### running on ace, so if it hadn't been automounted, -d might fail
#### to find the directory.
my $gnu2 = '/project/danzon/pkg/gnu/bin';
$ENV{'PATH'} = "$gnu2" . ':' . $ENV{'PATH'};
my $export_dir = '/project/ftp-doc/pub/ACE';
my $diffs_dir = "$export_dir/diffs";
my $exec_prefix = '';
my $generate_man_pages = 0;
my $install = 0;
my $kit = '';
my $release_type = 'beta';
my $ace_tag = my $tao_tag = '';
my $controlled_files = my $release_files = my $release_lib_files = '';
my $release_tag_files = '';
my $release_filter = '\\( -name CVS -o -name build \\) -prune -o ' .
'! -name \'.\#*\' ! -name \'\#*\' ! -name \'*~\' ' .
'! -name \'*.MAK\' -print';
my $update_versions = 0;
my $create_zips = 1;
########
######## Process command line args.
########
while ($#ARGV >= $[ && $ARGV[0] =~ /^-/) {
if ($ARGV[0] eq '-i') {
$install = 1;
} elsif ($ARGV[0] eq '-g') {
$generate_man_pages = 1;
} elsif ($ARGV[0] eq '-k') {
if ($ARGV[1] =~ /^[^-]+/ &&
($ARGV[1] eq 'ace' || $ARGV[1] eq 'tao' || $ARGV[1] eq 'ace+tao')) {
$kit = $ARGV[1]; shift;
} else {
print STDERR "$0: must provide argument for -k option\n";
die "$usage$long_usage";
}
} elsif ($ARGV[0] eq '-n') {
$exec_prefix = 'echo ';
} elsif ($ARGV[0] eq '-v') {
if ($ARGV[1] =~ /^[^-]+/ &&
($ARGV[1] eq 'major' || $ARGV[1] eq 'minor' ||
$ARGV[1] eq 'beta')) {
$release_type = $ARGV[1]; shift;
} else {
print STDERR "$0: must provide argument for -v option\n";
die "$usage$long_usage";
}
} elsif ($ARGV[0] eq '-ta') {
if ($ARGV[1] =~ /^[^-]+/) {
$ace_tag = $ARGV[1]; shift;
} else {
print STDERR "$0: must provide argument for -ta option\n";
die "$usage$long_usage";
}
} elsif ($ARGV[0] eq '-tt') {
if ($ARGV[1] =~ /^[^-]+/) {
$tao_tag = $ARGV[1]; shift;
} else {
print STDERR "$0: must provide argument for -tt option\n";
die "$usage$long_usage";
}
} elsif ($ARGV[0] eq '-c') {
if ($ARGV[1] =~ /^[^-]+/) {
$controlled_files = $ARGV[1]; shift;
} else {
print STDERR "$0: must provide argument for -c option\n";
die "$usage$long_usage";
}
} elsif ($ARGV[0] eq '-r') {
if ($ARGV[1] =~ /^[^-]+/) {
$release_files = $ARGV[1]; shift;
} else {
print STDERR "$0: must provide argument for -r option\n";
die "$usage$long_usage";
}
} elsif ($ARGV[0] eq '-l') {
if ($ARGV[1] =~ /^[^-]+/) {
$release_lib_files = $ARGV[1]; shift;
} else {
print STDERR "$0: must provide argument for -l option\n";
die "$usage$long_usage";
}
} elsif ($ARGV[0] eq '-u') {
$update_versions = 1;
} elsif ($ARGV[0] eq '-z') {
$create_zips = 0;
} elsif ($ARGV[0] eq '-?') {
print "$usage$long_usage";
exit;
} else {
print STDERR "$0: unknown option $ARGV[0]\n";
die "$usage$long_usage";
}
shift;
}
die "$0: must specify a -k option\n" unless "$kit";
my $KIT;
if ($kit eq 'ace') {
$KIT = 'ACE';
} elsif ($kit eq 'tao') {
$KIT = 'TAO';
} else {
#### Creating combined ACE+TAO kit. Don't use $KIT.
};
my $chmod = '/bin/chmod';
my $chgrp = "${gnu}chgrp";
my $cpio = "${gnu}cpio";
my $cvs = "${gnu}cvs";
my $date = "${gnu}date";
my $egrep = "${gnu}egrep";
my $find = "${gnu}find";
my $gzip = "${gnu}gzip";
my $make = "${gnu}make -s";
my $mv = '/bin/mv -f';
my $rm = "${gnu}rm -f";
my $md5sum = "${gnu2}/md5sum";
chop (my $now = `$date +"%a %b %d %T %Y"`);
unless ("$controlled_files") {
chomp ($controlled_files = `$make show_controlled_files`);
}
unless ("$release_files") {
chomp ($release_files = `$make show_release_files`);
}
unless ("$release_lib_files") {
chomp ($release_lib_files = `$make show_release_lib_files`);
}
unless ("$release_tag_files") {
chomp ($release_tag_files = `$make show_release_tag_files`);
}
########
######## Setup signal handlers.
########
my $status = 1; #### Must get set to 0 explicitly to indicate success.
$SIG{'HUP'} = $SIG{'INT'} = $SIG{'QUIT'} = $SIG{'TERM'} = 'cleanup';
########
######## Defend against fascist umasks.
########
umask 022;
my $major_version = my $minor_version = my $beta_version = 0;
my $previous_version = my $version = '';
my $ace_version = '';
########
######## Main execution thread.
########
if ($update_versions && "$kit" ne 'ace+tao') {
#### Update versions and tag, but don't create the kit.
$status =
&check_workspace () ||
&get_versions () ||
&update_version_files () ||
&update_changelog () ||
&tag ();
} else {
#### Create the kit.
#### If a tag was specified, export using the tag from a staging area.
#### If not, create a kit from the current directory.
my $stage_dir = '..';
if ("$ace_tag" || "$tao_tag") {
$stage_dir = "/tmp/ACE_wrappers_stage-$$/";
unless ("$exec_prefix") {
mkdir "$stage_dir", 0755 ||
die "$0: unable to mkdir $stage_dir\n";
}
}
if ("$exec_prefix") {
print "chdir $stage_dir\n";
} else {
chdir $stage_dir || die "$0: unable to chdir $stage_dir\n";
}
if ("$ace_tag") {
&ex ("$cvs -q export -r$ace_tag -kv ACE_wrappers > /dev/null") &&
die "$0: failed cvs export of $ace_tag in $stage_dir\n";
unless ("$exec_prefix") {
mkdir "ACE_wrappers/man", 0755 ||
die "$0: unable to mkdir $stage_dir/ACE_wrappers/man\n";
mkdir "ACE_wrappers/man/man3", 0755 ||
die "$0: unable to mkdir $stage_dir/ACE_wrappers/man/man3\n";
mkdir "ACE_wrappers/man/html", 0755 ||
die "$0: unable to mkdir $stage_dir/ACE_wrappers/man/html\n";
}
if ($generate_man_pages) {
&ex ("cd ACE_wrappers && bin/generate_man_pages") &&
die "$0: failed to generate man pages in $stage_dir/ACE_wrappers\n";
}
&ex ("cd ACE_wrappers && $make ACE-INSTALL") &&
die "$0: failed make ACE-INSTALL in $stage_dir/ACE_wrappers\n";
}
if ("$tao_tag") {
&ex ("$cvs -q export -r$tao_tag -kv ACE_wrappers/TAO > /dev/null") &&
die "$0: failed cvs export of $tao_tag in $stage_dir\n";
&ex ("cd ACE_wrappers/TAO && $make INSTALL orbsvcs/README") &&
die "$0: failed make INSTALL TAO/orbsvcs/README in " .
"$stage_dir/ACE_wrappers/TAO\n";
}
$status = &create_kit ();
if (! $status && $install) {
if ("$ace_tag") {
my $major_v = 0;
my $minor_v = 0;
my $beta_v = 0;
if ($ace_tag =~ /(\d+)_(\d+)_(\d+)/o) {
my $major_v = $1;
my $minor_v = $2;
my $beta_v = $3;
#### $previous_version is used by diff ().
if ($beta_v > 0) {
my $previous_beta = $beta_v - 1;
$previous_version = "$major_v.$minor_v.$previous_beta";
&diff ('ACE_wrappers', "ACE-$previous_version", "$ace_tag");
}
}
}
if ("$tao_tag") {
my $major_v = 0;
my $minor_v = 0;
my $beta_v = 0;
if ($tao_tag =~ /(\d+)_(\d+)_(\d+)/o) {
my $major_v = $1;
my $minor_v = $2;
my $beta_v = $3;
#### $previous_version is used by diff ().
if ($beta_v > 0) {
my $previous_beta = $beta_v - 1;
$previous_version = "$major_v.$minor_v.$previous_beta";
&diff ('ACE_wrappers/TAO', "TAO-$previous_version", "$tao_tag");
}
}
}
}
if ("$ace_tag" || "$tao_tag") {
if ($install) {
chdir "..";
&ex ("$rm -r $stage_dir") &&
warn "$0: failed to remove $stage_dir\n";
} else {
warn "$0: kits are in $stage_dir\n";
}
}
}
&cleanup;
########
######## Clean up when done or on signal.
########
sub cleanup {
exit $status;
}
########
######## Check that the workspace is up-to-date, if releasing from
######## the official release directory.
########
sub check_workspace () {
my $module;
if ($kit =~ /^ace/) {
chdir '..' || die "$0: unable to chdir ..\n";
$module = 'ACE_wrappers';
} elsif ($kit =~ /tao/) {
chdir '../..' || die "$0: unable to chdir ../..\n";
$module = 'ACE_wrappers/TAO';
}
my @out_of_date = ();
open (CVS, "$cvs -nq checkout -P $module 2>&1 |") ||
die "$0: unable to open $cvs\n";
while (<CVS>) {
next if m%^U %; #### Allow others to update the repository.
next if m%^cvs checkout: New directory `.*' -- ignored$%; #### empty dirs.
push (@out_of_date, $_) if "$_";
}
close CVS;
if ($kit =~ /^ace/) {
chdir 'ACE_wrappers' || die "$0: unable to chdir ACE_wrappers\n";
} elsif ($kit =~ /tao/) {
chdir 'ACE_wrappers/TAO' || die "$0: unable to chdir ACE_wrappers/TAO\n";
}
if (@out_of_date) {
warn "ERROR: workspace must be updated (with cvs -q up -d) or " .
"cleaned:\n " .
join ("\n ", @out_of_date) . "\n";
return 1;
}
0;
}
########
######## Retrieve version information from VERSION file(s).
########
sub get_versions () {
open (VERSION, '< VERSION') ||
die "$0: unable to open VERSION\n";
while (<VERSION>) {
if (/$KIT version (\d+)\.(\d+)\.(\d+)/o) {
$major_version = $1;
$minor_version = $2;
$beta_version = $3;
last;
} elsif (/$KIT version (\d+)\.(\d+)[^\.]/o) {
#### Previous release was a minor.
$major_version = $1;
$minor_version = $2;
last;
} elsif (/$KIT version (\d+)[^\.]/o) {
#### Previous release was a major.
$major_version = $1;
last;
}
}
close VERSION;
if ($release_type eq 'beta') {
++$beta_version;
$version = "$major_version.$minor_version.$beta_version";
} elsif ($release_type eq 'minor' ) {
$beta_version = 0;
++$minor_version;
$version = "$major_version.$minor_version";
} elsif ($release_type eq 'major' ) {
$minor_version = $beta_version = 0;
++$major_version;
$version = "$major_version.$minor_version";
}
print "new $KIT version: $version\n";
if ($kit =~ /tao/) {
my $ace_major_version = my $ace_minor_version = my $ace_beta_version = 0;
open (ACE_VERSION, '< ../VERSION') ||
die "$0: unable to open ../VERSION\n";
while (<ACE_VERSION>) {
if (/ACE version (\d+)\.(\d+)\.(\d+)/o) {
$ace_major_version = $1;
$ace_minor_version = $2;
$ace_beta_version = $3;
last;
} elsif (/ACE version (\d+)\.(\d+)[^\.]/o) {
#### ACE release was a minor.
$ace_major_version = $1;
$ace_minor_version = $2;
last;
} elsif (/ACE version (\d+)[^\.]/o) {
#### ACE release was a major.
$ace_major_version = $1;
last;
}
}
close ACE_VERSION;
if ($ace_beta_version == 0) {
$ace_version = "$ace_major_version.$ace_minor_version";
} else {
$ace_version = "$ace_major_version.$ace_minor_version.$ace_beta_version";
}
}
0;
}
########
######## Update VERSION file(s).
########
sub update_version_files () {
&ex ("perl -pi -e " .
"'s/$KIT version .*/$KIT version $version, released $now./' VERSION");
return 1 if $? >> 8;
&ex ("perl -pi -e 's/$KIT VERSION:.*/$KIT VERSION: $version/' " .
"PROBLEM-REPORT-FORM");
return 1 if $? >> 8;
if ($kit =~ /^tao/) {
&ex ("perl -pi -e 's/ACE VERSION:.*/ACE VERSION: $ace_version/' " .
"PROBLEM-REPORT-FORM");
return 1 if $? >> 8;
if ("$exec_prefix") {
print "TAO version ${major_version}.${minor_version}.${beta_version}\n";
} else {
open (TAO_VERSION_H, "> tao/Version.h") ||
die "$0: unable to open tao/Version.h\n";
print TAO_VERSION_H
"// \$Id\$\n" .
"// This is an automatically generated file.\n\n" .
"\#define TAO_MAJOR_VERSION ${major_version}\n" .
"\#define TAO_MINOR_VERSION ${minor_version}\n" .
"\#define TAO_BETA_VERSION ${beta_version}\n" .
"\#define TAO_VERSION \"${version}\"\n";
close TAO_VERSION_H;
}
}
if ($kit =~ /^ace/) {
if ("$exec_prefix") {
print "ACE version ${major_version}.${minor_version}.${beta_version}\n";
} else {
open (ACE_VERSION_H, "> ace/Version.h") ||
die "$0: unable to open ace/Version.h\n";
print ACE_VERSION_H
"// \$Id\$\n" .
"// This is an automatically generated file.\n\n" .
"\#define ACE_MAJOR_VERSION ${major_version}\n" .
"\#define ACE_MINOR_VERSION ${minor_version}\n" .
"\#define ACE_BETA_VERSION ${beta_version}\n" .
"\#define ACE_VERSION \"${version}\"\n";
close ACE_VERSION_H;
}
}
0;
}
########
######## Add ChangeLog entries, and make sure that they have proper
######## permissions.
########
sub update_changelog () {
my $logname = $ENV{'LOGNAME'};
if (! "$logname") {
chop ($logname = `/usr/ucb/whoami`);
}
my $signature = $ENV{'SIGNATURE'} || $logname;
my $message = "$now $signature <$logname\@cs.wustl.edu>\n\n" .
" * $KIT version $version released.\n\n";
if ("$exec_prefix") {
print "Adding to ChangeLog: \n", $message, "\n";
return 0;
}
open (NEW_CHANGELOG, ">ChangeLog.bak")
|| return 1;
open (CHANGELOG, "ChangeLog")
|| return 1;
print NEW_CHANGELOG $message;
while (<CHANGELOG>) {
print NEW_CHANGELOG $_;
}
close (CHANGELOG)
|| return 1;
close (NEW_CHANGELOG)
|| return 1;
rename "ChangeLog.bak", "ChangeLog"
|| return 1;
my $version_h = $kit =~ /^ace/ ? 'ace/Version.h' : 'tao/Version.h';
&ex ("$cvs commit -m'$version' " .
"VERSION PROBLEM-REPORT-FORM ChangeLog $version_h && " .
"chmod 0644 VERSION PROBLEM-REPORT-FORM ChangeLog $version_h; " .
"chgrp doc VERSION PROBLEM-REPORT-FORM ChangeLog $version_h");
return 1 if $? >> 8;
0;
}
########
######## Tag the release.
########
sub tag () {
my $tag = "$KIT-$version";
#### cvs tag does not allow dots.
$tag =~ tr/./_/;
print "start tagging $tag\n";
if ($KIT eq "TAO") {
chdir "..";
}
&ex ("$cvs -q tag $tag $controlled_files $release_tag_files > /dev/null");
if ($KIT eq "TAO") {
chdir "TAO";
}
return 1 if $? >> 8;
print "finished tagging $tag\n";
0;
}
########
######## If building a beta, create a diff from the previous version.
########
sub diff () {
my ($module, $previous_tag, $tag) = @_;
if ("$previous_version") {
#### Only create a diff for a beta version.
#### cvs tag does not allow dots.
$previous_tag =~ tr/./_/;
$tag =~ tr/./_/;
&ex ("nice -15 $cvs -q rdiff -u -r $previous_tag -r $tag " .
"$module 2>/dev/null | " .
"nice -15 sed 's%ACE_wrappers-repository/%ACE_wrappers/%g' | " .
"nice -15 $gzip -9 > $diffs_dir/$previous_tag-$tag.diff.gz")
if -d "$diffs_dir";
}
#### Ignore return value. No promises on diffs.
0;
}
########
######## Create the tar file(s) and move to their proper location.
########
sub create_kit () {
#### Create kits with group write permission.
umask 2;
my $dest = $install ? "$export_dir" : 'created';
my $dispose = $install ? "$mv" : 'echo';
my $checksum = $install ? "$md5sum" : 'echo';
my $cksum_ext = 'md5';
my $redirect = $install ? '>' : '\>';
my $shell_cd = $install ? 'cd' : 'echo cd';
# These files don't get LF->CRLF conversions done when making the zip.
my $bin_files =
"\"\\.dsp|\\.dsw|\\.mak|\\.mdp|\\.ide|\\.exe\|\\.ico\|\\.gz\|\\.zip\|" .
"\\.gif\"";
my $build_command;
my $archives;
## Temporary ACE+autoconf hack to bootstrap autoconf support into
## ACE distribution.
&ex("cd ACE_wrappers && bin/bootstrap");
if ($kit eq 'ace' || $kit eq 'ace+tao') {
if ($create_zips) {
$build_command =
"$rm ACE.zip ACE-lib.zip; " .
"$find $release_files $release_filter | $egrep $bin_files | " .
"zip ACE.zip -q9@ &&" .
"$find $release_files $release_filter | $egrep -v $bin_files | " .
"zip ACE.zip -qlg9@ &&" .
"$find $release_lib_files $release_filter | $egrep $bin_files | " .
"zip ACE-lib.zip -q9@ &&" .
"$find $release_lib_files $release_filter | $egrep -v $bin_files | " .
"zip ACE-lib.zip -qlg9@ &&" .
"$find $release_files $release_filter | $cpio -o -H tar | " .
"$gzip -9 > ACE.tar.gz && " .
"$find $release_lib_files $release_filter | $cpio -o -H tar | " .
"$gzip -9 > ACE-lib.tar.gz && " .
"$chmod 664 ACE.tar.gz ACE-lib.tar.gz ACE.zip ACE-lib.zip && " .
"$chgrp doc ACE.tar.gz ACE-lib.tar.gz ACE.zip ACE-lib.zip && " .
"$dispose ACE.zip ACE-lib.zip $dest && " .
"$dispose ACE.tar.gz ACE-lib.tar.gz $dest; ";
$archives = " ACE.tar.gz ACE-lib.tar.gz ACE.zip ACE-lib.zip ";
} else {
$build_command =
"$find $release_files $release_filter | $cpio -o -H tar | " .
"$gzip -9 > ACE.tar.gz && " .
"$find $release_lib_files $release_filter | $cpio -o -H tar | " .
"$gzip -9 > ACE-lib.tar.gz && " .
"$chmod 664 ACE.tar.gz ACE-lib.tar.gz && " .
"$chgrp doc ACE.tar.gz ACE-lib.tar.gz && " .
"$dispose ACE.tar.gz ACE-lib.tar.gz $dest; ";
$archives = " ACE.tar.gz ACE-lib.tar.gz ";
}
}
if ($kit eq 'ace+tao') {
$release_files .= ' ACE_wrappers/TAO';
if ($create_zips) {
$build_command .=
"$rm ACE+TAO.zip; " .
"$find $release_files $release_filter | $egrep $bin_files | " .
"zip ACE+TAO.zip -q9@ &&" .
"$find $release_files $release_filter | $egrep -v $bin_files | " .
"zip ACE+TAO.zip -qlg9@ &&" .
"$find $release_files $release_filter | $cpio -o -H tar | " .
"$gzip -9 > ACE+TAO.tar.gz && " .
"$chmod 664 ACE+TAO.tar.gz ACE+TAO.zip && " .
"$chgrp doc ACE+TAO.tar.gz ACE+TAO.zip && " .
"$dispose ACE+TAO.tar.gz ACE+TAO.zip $dest";
$archives .= " ACE+TAO.tar.gz ACE+TAO.zip ";
} else {
$build_command .=
"$find $release_files $release_filter | $cpio -o -H tar | " .
"$gzip -9 > ACE+TAO.tar.gz && " .
"$chmod 664 ACE+TAO.tar.gz && " .
"$chgrp doc ACE+TAO.tar.gz && " .
"$dispose ACE+TAO.tar.gz $dest";
$archives .= " ACE+TAO.tar.gz ";
}
}
# The "$dest/\$p" is going to look a bit funny if the release isn't
# being installed in the FTP directory since it will expand to
# `created/ACE.tar.gz', for example. No big deal, I guess.
my $checksum_command =
"$shell_cd $dest; " .
"for p in $archives; do " .
"$rm \${p}.${cksum_ext}; " .
"$checksum \$p $redirect \${p}.${cksum_ext}; " .
"done";
&ex ($build_command);
&ex ($checksum_command);
}
########
######## Execute a command, unless -n had been specified. Return value
######## of 0 indicates success.
########
sub ex ()
{
my ($command) = @_;
if ("$exec_prefix") {
print $command . "\n";
0;
} else {
system ("$command");
}
}
|