[LON-CAPA-cvs] cvs: loncom /build lpml_parse.pl

harris41 lon-capa-cvs@mail.lon-capa.org
Sun, 21 Apr 2002 23:36:17 -0000


harris41		Sun Apr 21 19:36:17 2002 EDT

  Modified files:              
    /loncom/build	lpml_parse.pl 
  Log:
  latest version from http://lpml.sourceforge.net/; it supports MANIFEST mode
  (generating a file listing with which to build a tarball)
  
  
Index: loncom/build/lpml_parse.pl
diff -u loncom/build/lpml_parse.pl:1.45 loncom/build/lpml_parse.pl:1.46
--- loncom/build/lpml_parse.pl:1.45	Sat Apr 13 15:29:32 2002
+++ loncom/build/lpml_parse.pl	Sun Apr 21 19:36:17 2002
@@ -12,7 +12,7 @@
 # The LearningOnline Network with CAPA
 # lpml_parse.pl - Linux Packaging Markup Language parser
 #
-# $Id: lpml_parse.pl,v 1.45 2002/04/13 19:29:32 harris41 Exp $
+# $Id: lpml_parse.pl,v 1.46 2002/04/21 23:36:17 harris41 Exp $
 #
 # Written by Scott Harrison, codeharrison@yahoo.com
 #
@@ -1056,7 +1056,10 @@
 sub format_files {
     my $text=$parser->get_text('/files');
     $parser->get_tag('/files');
-    if ($mode eq 'html') {
+    if ($mode eq 'MANIFEST') {
+	return $text;
+    }
+    elsif ($mode eq 'html') {
 	return $directories="\n<br />&nbsp;<br />".
 	    "<a name='files' />".
 	    "<font size='+2'>Files</font><br />&nbsp;<br />".
@@ -1174,7 +1177,10 @@
     $categorycount{$categoryname}++;
     if ($source) {
 	$parser->get_tag('/file');
-	if ($mode eq 'html') {
+	if ($mode eq 'MANIFEST') {
+	    return $source."\n";
+	}
+	elsif ($mode eq 'html') {
 	    return ($file="\n<!-- FILESORT:$target -->".
 		    "<tr>".
           "<td><!-- POSTEVAL [$categoryname] verify.pl file '$sourcerootarg' ".
@@ -1385,7 +1391,10 @@
     $categorycount{$categoryname}+=scalar(@semi)+1;
     if ($sourcedir) {
 	$parser->get_tag('/fileglob');
-	if ($mode eq 'html') {
+	if ($mode eq 'MANIFEST') {
+         return join("\n",(map {"$sourcedir$_"} split(/\;/,$filenames2)))."\n";
+	}
+	elsif ($mode eq 'html') {
 	    return $fileglob="\n<tr>".
       "<td><!-- POSTEVAL [$categoryname] verify.pl fileglob '$sourcerootarg' ".
 		"'$targetrootarg' ".