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

harris41 lon-capa-cvs@mail.lon-capa.org
Sat, 12 Oct 2002 15:17:42 -0000


harris41		Sat Oct 12 11:17:42 2002 EDT

  Modified files:              
    /nsdl/build	lpml_parse.pl 
  Log:
  updating NSDL build system to use the latest LPML XML parser
  
  
Index: nsdl/build/lpml_parse.pl
diff -u nsdl/build/lpml_parse.pl:1.1 nsdl/build/lpml_parse.pl:1.2
--- nsdl/build/lpml_parse.pl:1.1	Sat May  4 22:44:57 2002
+++ nsdl/build/lpml_parse.pl	Sat Oct 12 11:17:42 2002
@@ -12,7 +12,7 @@
 # The LearningOnline Network with CAPA
 # lpml_parse.pl - Linux Packaging Markup Language parser
 #
-# $Id: lpml_parse.pl,v 1.1 2002/05/05 02:44:57 harris41 Exp $
+# $Id: lpml_parse.pl,v 1.2 2002/10/12 15:17:42 harris41 Exp $
 #
 # Written by Scott Harrison, codeharrison@yahoo.com
 #
@@ -1266,36 +1266,55 @@
 	elsif ($mode eq 'configinstall' && $categoryname eq 'conf') {
 	    push @configall,$targetroot.'/'.$target;
 	    return $targetroot.'/'.$target.': alwaysrun'."\n".
-		"\t".'@echo -n ""; ECODE=0 && { perl filecompare.pl -b4 '.
-		$sourceroot.'/'.$source.' '.$targetroot.'/'.$target.
-		' || ECODE=$$?; } && '.
-		'{ [ $$ECODE != "2" ] || (install '.
-                $categoryhash{$categoryname}.' '.
-		$sourceroot.'/'.$source.' '.
-		$targetroot.'/'.$target.'.lpmlnew'.
+		"\t".'@# Compare source with target and intelligently respond'.
+		"\n\t\n\t\n".
+
+
+		"\t".'@echo -n ""; ECODE=0 && { perl filecompare.pl -b4 \\'.
+		"\n\t".$sourceroot.'/'.$source." \\\n\t".
+		$targetroot.'/'.$target." \\\n\t".
+		' || ECODE=$$?; } && '."\\\n\t"."\\\n\t"."\\\n\t".
+
+
+		'{ [ $$ECODE != "2" ] || '." \\\n\t".'(install '.
+                $categoryhash{$categoryname}." \\\n\t\t".
+		$sourceroot.'/'.$source." \\\n\t\t".
+		$targetroot.'/'.$target.'.lpmlnew'." \\\n\t\t".
 		' && echo "**** NOTE: CONFIGURATION FILE CHANGE ****"'.
-		$logcmd.' && echo "'.
-		'You likely need to compare contents of '.
-		''.$targetroot.'/'.$target.' with the new '.
-                ''.$targetroot.'/'.$target.'.lpmlnew"'.
-		"$logcmd); } && ".
-		'{ [ $$ECODE != "3" ] || (install '.
-                $categoryhash{$categoryname}.' '.
-		$sourceroot.'/'.$source.' '.
-		$targetroot.'/'.$target.''.
+		" \\\n\t\t".$logcmd.' && '." \\\n\t\t"."echo -n \"".
+		'You likely need to compare contents of "'."\\\n\t\t\t".
+		'&& echo -n "'.$targetroot.'/'.$target.'"'."\\\n\t\t".
+		'&& echo -n " with the new "'."\\\n\t\t\t".
+                '&& echo "'.$targetroot.'/'.$target.'.lpmlnew"'."\\\n\t\t".
+		"$logcmd); } && "." \\\n\t"."\\\n\t"."\\\n\t".
+
+
+		'{ [ $$ECODE != "3" ] || '."\\\n\t".
+		'(install '.
+                $categoryhash{$categoryname}."\\\n\t\t".
+		$sourceroot.'/'.$source."\\\n\t\t".
+		$targetroot.'/'.$target."\\\n\t\t".
 		' && echo "**** WARNING: NEW CONFIGURATION FILE ADDED ****"'.
-		$logcmd.' && echo "'.
-		'You likely need to review the contents of '.
-		''.$targetroot.'/'.$target.' to make sure its '.
-                'settings are compatible with your overall system"'.
-		"$logcmd); } && ".
-		'{ [ $$ECODE != "1" ] || ('.
-		'echo "**** ERROR ****"'.
-		$logcmd.' && echo "'.
-		'Configuration source file does not exist '.
-		''.$sourceroot.'/'.$source.'"'.
-	      "$logcmd); } && perl verifymodown.pl ${targetroot}/${target} \"".
-		"$categoryhash{$categoryname}\"$logcmd;\n\n";
+		"\\\n\t\t".$logcmd.' && '."\\\n\t\t".
+		'echo -n "'.
+		'You likely need to review the contents of "'."\\\n\t\t\t".
+		'&& echo -n "'.
+		$targetroot.'/'.$target.'"'."\\\n\t\t\t".
+		'&& echo -n "'.
+		' to make sure its "'."\\\n\t\t".
+		'&& echo "'.
+                'settings are compatible with your overall system"'."\\\n\t\t".
+		"$logcmd); } && "."\\\n\t"."\\\n\t"."\\\n\t".
+
+
+		'{ [ $$ECODE != "1" ] || ('."\\\n\t\t".
+		'echo "**** ERROR ****"'.$logcmd.' && '."\\\n\t\t".'echo -n "'.
+		'Configuration source file does not exist "'."\\\n\t\t".
+		'&& echo -n "'.$sourceroot.'/'.$source.'"'."\\\n\t\t".
+		"$logcmd); } && "."\\\n\t\t".
+		"perl verifymodown.pl ${targetroot}/${target} "."\\\n\t\t\t".
+		"\"$categoryhash{$categoryname}\""."\\\n\t\t\t".
+		"$logcmd;\n\n";
 	}
 	elsif ($mode eq 'build' && $build) {
 	    push @buildall,$sourceroot.'/'.$source;