Diff for /loncom/build/lpml_parse.pl between versions 1.26 and 1.27

version 1.26, 2001/12/05 01:39:08 version 1.27, 2001/12/06 00:22:53
Line 7 Line 7
 # 9/5/2001,9/6,9/7,9/8 - Scott Harrison  # 9/5/2001,9/6,9/7,9/8 - Scott Harrison
 # 9/17,9/18 - Scott Harrison  # 9/17,9/18 - Scott Harrison
 # 11/4,11/5,11/6,11/7,11/16,11/17 - Scott Harrison  # 11/4,11/5,11/6,11/7,11/16,11/17 - Scott Harrison
 #  # 12/2,12/3,12/4,12/5 - Scott Harrison
 # $Id$  # $Id$
 ###  ###
   
Line 77  if (@ARGV) { Line 77  if (@ARGV) {
   
 my $targetroot;  my $targetroot;
 my $sourceroot;  my $sourceroot;
   my $targetrootarg;
   my $sourcerootarg;
 if (@ARGV) {  if (@ARGV) {
     $sourceroot = shift @ARGV;      $sourceroot = shift @ARGV;
 }  }
Line 85  if (@ARGV) { Line 87  if (@ARGV) {
 }  }
 $sourceroot=~s/\/$//;  $sourceroot=~s/\/$//;
 $targetroot=~s/\/$//;  $targetroot=~s/\/$//;
   $sourcerootarg=$sourceroot;
   $targetrootarg=$targetroot;
   
 my $logcmd='| tee -a WARNINGS';  my $logcmd='| tee -a WARNINGS';
   
Line 493  sub format_category { Line 497  sub format_category {
     $fab{$category_att_name}=$abbreviation;      $fab{$category_att_name}=$abbreviation;
     if ($mode eq 'html') {      if ($mode eq 'html') {
  if ($category_att_type eq $categorytype) {   if ($category_att_type eq $categorytype) {
       $categoryhash{$category_att_name}="$chmod $chown";
     return $category="<tr>".      return $category="<tr>".
  "<td><img src='$abbreviation.gif' ".   "<td><img src='$abbreviation.gif' ".
            "alt='${category_att_name}' /></td>\n".             "alt='${category_att_name}' /></td>\n".
Line 953  sub format_file { Line 958  sub format_file {
  if ($mode eq 'html') {   if ($mode eq 'html') {
     return ($file="\n<!-- FILESORT:$target -->".      return ($file="\n<!-- FILESORT:$target -->".
     "<tr>".      "<tr>".
     "<td>&nbsp;</td><td><img src='$fab{$categoryname}.gif' ".      "<td><!-- POSTEVAL -->&nbsp;</td><td>".
       "<img src='$fab{$categoryname}.gif' ".
     "alt='$categoryname icon' /></td>".      "alt='$categoryname icon' /></td>".
     "<td>$categoryname</td>".      "<td>$categoryname<br /><font size='-1'>".
       $categoryhash{$categoryname}."</font></td>".
     "<td>SOURCE: $source<br />TARGET: $target</td>".      "<td>SOURCE: $source<br />TARGET: $target</td>".
     "<td>$description</td>".      "<td>$description</td>".
     "<td>$note</td>".      "<td>$note</td>".
Line 1011  $buildtest \@if !(test -e "${sourceroot} Line 1018  $buildtest \@if !(test -e "${sourceroot}
  case "\$\$ECODE" in \\   case "\$\$ECODE" in \\
  1) echo "${targetroot}/${target} is unchanged";; \\   1) echo "${targetroot}/${target} is unchanged";; \\
  2) echo "**** WARNING **** target file ${targetroot}/${target} is newer than CVS source; saving current (old) target file to ${targetroot}/${target}.lpmlsave and then overwriting"$logcmd && install -o www -g www -m 0600 ${targetroot}/${target} ${targetroot}/${target}.lpmlsave && install $categoryhash{$categoryname} ${sourceroot}/${source} ${targetroot}/${target};; \\   2) echo "**** WARNING **** target file ${targetroot}/${target} is newer than CVS source; saving current (old) target file to ${targetroot}/${target}.lpmlsave and then overwriting"$logcmd && install -o www -g www -m 0600 ${targetroot}/${target} ${targetroot}/${target}.lpmlsave && install $categoryhash{$categoryname} ${sourceroot}/${source} ${targetroot}/${target};; \\
  0) echo "install $categoryhash{$categorname} ${sourceroot}/${source} ${targetroot}/${target}" && install $categoryhash{$categoryname} ${sourceroot}/${source} ${targetroot}/${target};; \\   0) echo "install $categoryhash{$categoryname} ${sourceroot}/${source} ${targetroot}/${target}" && install $categoryhash{$categoryname} ${sourceroot}/${source} ${targetroot}/${target};; \\
  esac; \\   esac; \\
  perl verifymodown.pl ${targetroot}/${target} "$categoryhash{$categoryname}"$logcmd; \\   perl verifymodown.pl ${targetroot}/${target} "$categoryhash{$categoryname}"$logcmd; \\
  fi   fi
Line 1066  END Line 1073  END
 # --------------------------------------------------------- Format link section  # --------------------------------------------------------- Format link section
 sub format_link {  sub format_link {
     my @tokeninfo=@_;      my @tokeninfo=@_;
     $link=''; $linkto=''; $target=''; $categoryname=''; $description='';      $link=''; $linkto=''; $source=''; $target=''; $categoryname=''; 
     $note=''; $build=''; $status=''; $dependencies='';      $description=''; $note=''; $build=''; $status=''; $dependencies='';
     my $text=&trim($parser->get_text('/link'));      my $text=&trim($parser->get_text('/link'));
     if ($linkto) {      if ($linkto) {
  $parser->get_tag('/link');   $parser->get_tag('/link');
  if ($mode eq 'html') {   if ($mode eq 'html') {
     return $link="\n<tr><td colspan='6'>BEGIN LINK\n".      my @targets=map {s/^\s*//;s/\s$//;$_} split(/\;/,$target);
  "$linkto $target $categoryname $description $note " .      foreach my $tgt (@targets) {
  "$build $status $dependencies" .   push @links,("\n<!-- FILESORT:$tgt -->".
     "\nEND LINK</td></tr>";      "<tr>".
       "<td><!-- POSTEVAL -->&nbsp;</td><td>".
       "<img src='$fab{$categoryname}.gif' ".
       "alt='$categoryname icon' /></td>".
       "<td><font size='-1'>$categoryname</font></td>".
       "<td>LINKTO: $linkto<br />TARGET: $tgt</td>".
       "<td>$description</td>".
       "<td>$note</td>".
       "</tr>");
   # push @links,"\t".'ln -fs /'.$linkto.' /'.$targetroot.$tgt.
   #    "\n";
       }
       return join('',@links);
   #    return ($link="\n<!-- FILESORT:$target -->".
   #    "<tr>".
   #    "<td>&nbsp;</td><td><img src='$fab{$categoryname}.gif' ".
   #    "alt='$categoryname icon' /></td>".
   #    "<td>$categoryname</td>".
   #    "<td>LINKTO: $linkto<br />TARGET: $target</td>".
   #    "<td>$description</td>".
   #    "<td>$note</td>".
   #    "</tr>");
   #    return $link="\n<tr><td colspan='6'>BEGIN LINK\n".
   # "$linkto $target $categoryname $description $note " .
   # "$build $status $dependencies" .
   #    "\nEND LINK</td></tr>";
  }   }
  elsif ($mode eq 'install') {   elsif ($mode eq 'install') {
     my @targets=map {s/^\s*//;s/\s$//;$_} split(/\;/,$target);      my @targets=map {s/^\s*//;s/\s$//;$_} split(/\;/,$target);
Line 1099  sub format_fileglob { Line 1131  sub format_fileglob {
     $note=''; $build=''; $status=''; $dependencies='';      $note=''; $build=''; $status=''; $dependencies='';
     $filenames='';      $filenames='';
     my $text=&trim($parser->get_text('/fileglob'));      my $text=&trim($parser->get_text('/fileglob'));
       my $filenames2=$filenames;$filenames2=~s/\s//g;
     if ($sourcedir) {      if ($sourcedir) {
  $parser->get_tag('/fileglob');   $parser->get_tag('/fileglob');
  if ($mode eq 'html') {   if ($mode eq 'html') {
     return $fileglob="\n<tr><td colspan='6'>BEGIN FILEGLOB\n".      return $fileglob="\n<tr>".
  "$glob sourcedir $targetdir $categoryname $description $note ".   "<td><!-- POSTEVAL2 verify.pl fileglob '$sourcerootarg' ".
  "$build $status $dependencies $filenames" .   "'$targetrootarg' ".
  "\nEND FILEGLOB</td></tr>";   "'$glob' '$sourcedir' '$filenames2' '$targetdir' ".
    "$categoryhash{$categoryname} -->&nbsp;</td>".
    "<td>"."<img src='$fab{$categoryname}.gif' ".
           "alt='$categoryname icon' /></td>".
    "<td>$categoryname<br />".
    "<font size='-1'>".$categoryhash{$categoryname}."</font></td>".
    "<td>SOURCEDIR: $sourcedir<br />".
    "TARGETDIR: $targetdir<br />".
                   "GLOB: $glob<br />".
                   "FILENAMES: $filenames".
    "</td>".
    "<td>$description</td>".
    "<td>$note</td>".
    "</tr>";
   #    return $fileglob="\n<tr><td colspan='6'>BEGIN FILEGLOB\n".
   # "$glob sourcedir $targetdir $categoryname $description $note ".
   # "$build $status $dependencies $filenames" .
   # "\nEND FILEGLOB</td></tr>";
  }   }
  elsif ($mode eq 'install') {   elsif ($mode eq 'install') {
     return "\t".'install '.      return "\t".'install '.

Removed from v.1.26  
changed lines
  Added in v.1.27


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