[LON-CAPA-cvs] cvs: loncom /build buildHelp.sh doc/help render.texxml.pl doc/loncapafiles loncapafiles.lpml

bowersj2 lon-capa-cvs@mail.lon-capa.org
Thu, 18 Jul 2002 14:58:04 -0000


bowersj2		Thu Jul 18 10:58:04 2002 EDT

  Modified files:              
    /doc/help	render.texxml.pl 
    /doc/loncapafiles	loncapafiles.lpml 
    /loncom/build	buildHelp.sh 
  Log:
  Build the author's manual on installation so the user doesn't have to
  bother with it. The author's manual will be at
  http://[server]/adm/help/authors.manual.ps .
  
  
  
Index: doc/help/render.texxml.pl
diff -u doc/help/render.texxml.pl:1.1 doc/help/render.texxml.pl:1.2
--- doc/help/render.texxml.pl:1.1	Tue Jul 16 16:45:05 2002
+++ doc/help/render.texxml.pl	Thu Jul 18 10:58:03 2002
@@ -29,7 +29,7 @@
 use Fcntl;
 use POSIX qw(tmpnam);
 
-if ( scalar(@ARGV) < 2 and 0 )
+if ( scalar(@ARGV) < 2 )
 {
     print (<<USAGE);
 Usage: $0 texxml_file_name or
@@ -41,6 +41,9 @@
 resulting from from texxml2latex.pl and the referenced eps files
 into a temporary directory and running LaTeX on the .tex file.
 
+If a second argument is passed, it is used as the location of the 
+.eps files the document uses.
+
 Must be run as somebody with permissions to write temp files and 
 access /home/httpd/html/adm/help/eps.
 USAGE
@@ -50,7 +53,12 @@
 
 my $tmpdir = tmpnam();
 my $fileroot = $ARGV[1];
-print $fileroot . "\n";
+my $epssource = "/home/httpd/html/adm/help/eps";
+
+if ( defined ( $ARGV[2] ) ) # override eps source, for build on install
+{
+    $epssource = $ARGV[2];
+}
 
 mkdir $tmpdir;
 
@@ -58,15 +66,15 @@
 system ( "perl texxml2latex.pl $fileroot.texxml > $tmpdir/$fileroot.tex" );
 
 print "Copying .eps files...\n";
-system ( "cp /home/httpd/html/adm/help/eps/* $tmpdir/" );
+system ( "cp $epssource/* $tmpdir/" );
 
 print "Running Latex...\n";
 system ( "cd $tmpdir; latex $fileroot >& /dev/null; latex $fileroot >& /dev/null; latex $fileroot >& /dev/null; " );
 
-print "dvips...\n";
-system ( "cd $tmpdir; dvips -f $fileroot.dvi > $fileroot.ps " );
+print "Running dvips...\n";
+system ( "cd $tmpdir; dvips -f $fileroot.dvi > $fileroot.ps >& /dev/null " );
 
-print "Copying dvi file...\n";
+print "Copying ps file...\n";
 system ( "cp $tmpdir/$fileroot.ps .");
 
 print "Clearing temp directory...\n";
Index: doc/loncapafiles/loncapafiles.lpml
diff -u doc/loncapafiles/loncapafiles.lpml:1.140 doc/loncapafiles/loncapafiles.lpml:1.141
--- doc/loncapafiles/loncapafiles.lpml:1.140	Tue Jul 16 15:11:29 2002
+++ doc/loncapafiles/loncapafiles.lpml	Thu Jul 18 10:58:03 2002
@@ -3,7 +3,7 @@
 <!-- loncapafiles.lpml -->
 <!-- Scott Harrison -->
 
-<!-- $Id: loncapafiles.lpml,v 1.140 2002/07/16 19:11:29 bowersj2 Exp $ -->
+<!-- $Id: loncapafiles.lpml,v 1.141 2002/07/18 14:58:03 bowersj2 Exp $ -->
 
 <!--
 
@@ -1290,6 +1290,15 @@
 </description>
 <status>works/unverified</status>
 <build trigger='always run'>loncom/build/buildHelp.sh</build>
+</file>
+<file>
+<source>/doc/help/author.manual.ps</source>
+<target dist='default'>home/httpd/html/adm/help/author.manual.ps</target>
+<categoryname>handler</categoryname>
+<description>
+The rendered Author's Manual
+</description>
+<status>works/unverified</status>
 </file>
 <fileglob>
 <glob>*.*</glob>
Index: loncom/build/buildHelp.sh
diff -u loncom/build/buildHelp.sh:1.1 loncom/build/buildHelp.sh:1.2
--- loncom/build/buildHelp.sh:1.1	Wed Jul 17 09:54:24 2002
+++ loncom/build/buildHelp.sh	Thu Jul 18 10:58:03 2002
@@ -1,3 +1,6 @@
 perl help_graphics_converter.pl
 cd ../../doc/help
 perl rebuildLabelHash.pl
+
+# build author manual, with the current eps files
+perl render.texxml.pl -- author.manual ../../loncom/html/adm/help/eps/
\ No newline at end of file