Annotation of doc/help/course_manual/buildTexxml.pl, revision 1.1

1.1     ! felicia     1: #!/usr/bin/perl
        !             2: 
        !             3: if ($#ARGV != 0) {
        !             4:   print "Correct command usage: \n";
        !             5:   print "   perl buildTexxml.pl all\n";
        !             6:   print "Or \n";
        !             7:   print "   perl buildTexxml.pl section\n";
        !             8: }
        !             9: 
        !            10: $option = $ARGV[0]; 
        !            11: 
        !            12: @section = `cat section_order.txt`;
        !            13: chomp @section;
        !            14: 
        !            15: if($option eq 'all') {
        !            16:   foreach $section (@section) {
        !            17:     $section='sections/'.$section;
        !            18:     $section_list=$section_list.$section.' ';
        !            19:   }
        !            20:   `cat sections/start.texxml $section_list sections/end.texxml > course.manual.texxml`;
        !            21: }
        !            22: 
        !            23: if($option eq 'section') {
        !            24:   print "Choose from the following manual sections:\n";
        !            25:   $num=0;
        !            26:   foreach $section (@section) {
        !            27:     print "$num - $section\n";
        !            28:     $num++;
        !            29:   }
        !            30:   print "Enter a number 0 - $num for the section you want to print: ";
        !            31:   $selection=<STDIN>;
        !            32:   print "builing section...\n";
        !            33:   `cat sections/start.texxml sections/$section[$selection] sections/end.texxml > section.manual.texxml`; 
        !            34: }
        !            35: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>