--- loncom/build/Attic/parse.pl 2000/12/09 17:03:57 1.5 +++ loncom/build/Attic/parse.pl 2000/12/10 03:06:11 1.8 @@ -94,6 +94,8 @@ if ($mode eq "ALL" || $mode eq "HTML") { @directories=&determine_directory_structure; $a=&make_directory_structure_description_block(\@directories); print $a; + $a=&make_file_type_ownership_and_permissions_description_block; + print $a; $a=&make_directory_and_file_structure_description_block(\@directories); print $a; $a=&end_description_page; @@ -116,6 +118,7 @@ sub begin_description_page {
  • About this file
  • Software Package Description
  • Directory Structure +
  • File Type Ownership and Permissions
  • File and Directory Structure About this file @@ -183,10 +186,17 @@ sub make_directory_structure_description END my $maxcount=0; + my @allfiles=keys %{$info{'LOCATION'}{$distribution}}; + my %diraccount; # hash to track which directories are accounted for + foreach my $file (@allfiles) { + $file=~/^(.*)\/([^\/]+)$/; + $diraccount{$1}=1; + } foreach my $d (@$dirs) { my (@matches)=($d=~/\//g); my $count=scalar(@matches); $maxcount=$count if $count>$maxcount; + delete $diraccount{$d}; } $description.=< @@ -195,6 +205,13 @@ END END $description.="\n"; + if (keys %diraccount) { + $description.= "\n"; + } foreach my $d (@$dirs) { my $dtable=$d; $dtable=~s/\//\<\/TD\>\/g; @@ -221,12 +238,60 @@ END return $description; } +# ------------------- Make file type ownership and permissions description block +sub make_file_type_ownership_and_permissions_description_block { + my $description=<File Type Ownership and Permissions Descriptions, $date +

    +This table shows what permissions and ownership settings correspond +to each kind of file type. +

    +

    +

    Development
    Permissions
    Directory Path
    Directories that are unaccounted for: \n";
    +	foreach my $d (keys %diraccount) {
    +	    $description.="$d\n";
    +	}
    +	$description.="
    + + + + + + +END + foreach my $type (keys %{$info{'OWNERSHIP'}}) { + if (defined($fcm{$type})) { + my $chmod=$info{'OWNERSHIP'}{$type}{'CHMOD'}; + my $chown=$info{'OWNERSHIP'}{$type}{'CHOWN'}; + my $devchmod=$info{'DEVOWNERSHIP'}{$type}{'CHMOD'}; + my $devchown=$info{'DEVOWNERSHIP'}{$type}{'CHOWN'}; + $description.=< + + + + + +END + } + } + $description.=< +

    +END +} + # ------------------------- Make directory and file structure description block sub make_directory_and_file_structure_description_block { my ($dirs)=@_; my $description=<Directory and File Structure Description, $date

    +The icons on the left column correspond to the file type +specified in the second column. The last column "Notes" shows compilation, +dependency, and configuration information. The CVS location +shows the location of the binary source file (if applicable) needed to +be copied to the target. If the binary source file is not at +the specified location, then the text is shown in +red. +

    +

    IconTypePermissionsDevelopment Permissions
    $type$type$chmod $chown$devchmod $devchown
    END my $counter=0; @@ -281,6 +346,13 @@ END my $category=$info{'LOCATION'}{$distribution}{$filesfull[$i]}{'CATEGORY'}; my $fdescription=$info{'LOCATION'}{$distribution}{$filesfull[$i]}{'DESCRIPTION'}; my $source=$info{'LOCATION'}{$distribution}{$filesfull[$i]}{'SOURCE'}; + unless (-e "../../$source") { + $source=~/([^\/]+)$/; + my $s=$1; + $source="$source"; +# my $fr=`cd ../../; find . -name $s`; +# $source.="
    $fr\n"; + } my $notes=$info{'LOCATION'}{$distribution}{$filesfull[$i]}{'NOTES'}; $description.=<