summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbala <balanatarajan@users.noreply.github.com>2003-06-02 16:28:06 +0000
committerbala <balanatarajan@users.noreply.github.com>2003-06-02 16:28:06 +0000
commita30f1fb1fd0a60cd009becfcdb47b110bcb45115 (patch)
tree99429b7d65164c8550a500bb9c090ac9c60ded1b
parent0f3105ad3cc4a8ecdafc9ccd93d554662d68a7e8 (diff)
downloadATCD-a30f1fb1fd0a60cd009becfcdb47b110bcb45115.tar.gz
ChangeLogTag:Mon Jun 2 11:24:10 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu>
-rw-r--r--ChangeLog7
-rwxr-xr-xbin/generate_rel_manpages62
2 files changed, 49 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index 49f2da621b8..dd4a415352d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Mon Jun 2 11:24:10 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu>
+
+ * bin/generate_rel_manpages: Added some debugging
+ statements. Looks like this script has a quite a bit of code
+ duplicated from make_release scripts. We will fix this for the
+ next beta.
+
Mon Jun 2 00:10:14 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu>
* bin/make_release:Fixed some apparent bugs. Left some debugging
diff --git a/bin/generate_rel_manpages b/bin/generate_rel_manpages
index 954e114e4e2..c1eb8400998 100755
--- a/bin/generate_rel_manpages
+++ b/bin/generate_rel_manpages
@@ -7,11 +7,20 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
use strict;
require Cwd;
+
###########
###### Sanity Checks
##########
+my $hostname;
+chomp ($hostname = $ENV{'HOSTNAME'} || `uname -n`);
+unless ("$hostname" eq 'deuce.doc.wustl.edu') {
+ #### For efficiency sake . . .
+ die "$0: must run on host deuce.doc.wustl.edu\n";
+}
my $perl_path = '/usr/bin/perl';
+my $status= 0;
+
&can_run($perl_path.' -V') ||
die "$0: perl path is incorrect, please fix the script\n";
@@ -28,12 +37,7 @@ my $doxy_version = '1.2.18';
$ENV{'PATH'} = $ENV{'PATH'}.':'.$doxy_path;
-my $hostname;
-chomp ($hostname = $ENV{'HOSTNAME'} || `uname -n`);
-unless ("$hostname" eq 'deuce.doc.wustl.edu') {
- #### For efficiency sake . . .
- die "$0: must run on host deuce.doc.wustl.edu\n";
-}
+
print "Starting doxygen document generation \n";
@@ -55,7 +59,6 @@ my $cksum_ext = 'md5';
my $redirect = '>';
my $checksum = '$md5sum';
-my $status = 1; #### Must get set to 0 explicitly to indicate success.
$SIG{'HUP'} = $SIG{'INT'} = $SIG{'QUIT'} = $SIG{'TERM'} = 'cleanup';
my $release_filter = '\\( -name CVS -o -name build \\) -prune -o ' .
@@ -67,6 +70,9 @@ my $bin_files =
"\\.gif|\\.vcp|\\.vcproj|\\.vcw|\\.sln\"";
my $dest = '/project/deuce/ftp/pub/ACE+TAO-distribution';
+my $release_files = '';
+
+chomp ($release_files = `$make show_release_files`);
########
######## Main execution thread.
@@ -78,23 +84,39 @@ my $build_command =
"$find html $release_filter | $cpio -o -H tar | " .
"$gzip -9 > ACE-html.tar.gz && ".
"$find html $release_filter | $cpio -o -H tar | " .
- "$bzip -9 > ACE-html.tar.bz2 && ".
- "$find html $release_filter | $egrep $bin_files | " .
+ "$bzip -9 > ACE-html.tar.bz2 && ".
+ "$find html $release_filter | $egrep -v $bin_files | " .
"zip ACE-html.zip -q9@ &&" .
"$mv ACE-html.tar.gz ACE-html.tar.bz2 ACE-html.zip $dest;";
-my $archives = "ACE-html.tar.gz ACE-html.tar.bz2 ACE-html.zip";
-
-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)
&& die "$0: failed to move ACE man pages to $dest\n";
-&ex ($checksum_command)
- && die "$0: failed to create checksum in $dest\n";
-
exit $status;
+
+
+########
+######## Verify that a command can be executed, return 1 on sucess
+########
+sub can_run {
+ my $command = shift;
+
+ open (RUN, "$command 2>&1 |")
+ || return 0;
+ while (<RUN>) {}
+ close(RUN)
+ || return 0;
+ return 1;
+}
+
+########
+######## Execute a command, unless -n had been specified. Return value
+######## of 0 indicates success.
+########
+sub ex ()
+{
+ my ($command) = @_;
+
+ print "Command is $command \n";
+ system ("$command");
+}