Changeset 5881 in genesis for tools/FreeBSD5_x/g_list.pl
- Timestamp:
- Jan 28, 2008, 8:52:13 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/FreeBSD5_x/g_list.pl
r5230 r5881 22 22 }; 23 23 24 sub filelist {25 foreach $file ( sort @filelist) {26 if( $HTML) {27 print "$file<BR>\n";28 }29 else {30 print "$file\n";31 };32 };33 }34 35 sub listnodes {36 opendir(DIR, $ndir) || die "can't opendir $ndir: $!";37 @tmpdirs = grep { /^[^\.]/ && -d "$ndir/$_" } readdir(DIR);38 closedir DIR;39 foreach $dir (sort @tmpdirs) {40 if( not exists($removefromnodelist{$dir}) )41 {42 push(@nodelist, $dir);43 }44 else45 {46 if ( $debug ) { print "'$dir' removed from list\n"; }47 }48 };49 return @nodelist;50 }51 52 sub nodelist {53 foreach $node (listnodes( )) {54 if( $HTML) {55 print "$node<BR>\n";56 }57 else {58 print "$node\n";59 };60 };61 }62 24 63 25 #REQUEST parsen … … 66 28 ($node,$file)=split(/\//,$1); 67 29 $title="$node $file"; 68 if ( $debug ) { print "Node: $node\n"; }69 if ( $debug ) { print "File: $file\n"; }70 30 } 71 31 else { … … 104 64 } 105 65 else { 106 g_list( ); 107 } 108 } 109 elsif( $node eq 'filelist' ) { 110 filelist( ); 111 } 112 elsif( $node eq 'nodelist' ) { 113 nodelist( ); 66 g_list( ); 67 }; 114 68 } 115 69 else { 116 70 if( $file eq '') { 117 filelist( ); 71 foreach $file ( sort @filelist) { 72 if( $HTML) { 73 print "$file<BR>\n"; 74 } 75 else { 76 print "$file\n"; 77 }; 78 }; 118 79 } 119 80 elsif( $file eq 'config') { … … 145 106 $revision=$1; 146 107 }; 147 printline("<H1>Genesis config (revision: $revision):</H1><P>\n<PRE>");108 printline("<H1>Genesis config - last changed rev $revision</H1><P>\n<PRE>"); 148 109 printline("$svn_version"); 149 110 printline("</PRE>"); … … 154 115 }; 155 116 156 @dirs = listnodes( ); 117 opendir(DIR, $ndir) || die "can't opendir $ndir: $!"; 118 @dirs = grep { /^[^\.]/ && -d "$ndir/$_" } readdir(DIR); 119 closedir DIR; 157 120 foreach $dir (sort @dirs) { 158 121 if( $dir=~/attic/ ) {
Note:
See TracChangeset
for help on using the changeset viewer.