# HG changeset patch # User aaronwolfe # Date 1270516816 0 # Node ID 3dcda506604b3870b0b39e301cb81d6d5af19125 # Parent 5a29eed1ca2d27efe469ef881edff0926c970ede added pretty indexer to dskcopy process diff -r 5a29eed1ca2d -r 3dcda506604b 3rdparty/utils/aaw/mkdskindex --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/3rdparty/utils/aaw/mkdskindex Tue Apr 06 01:20:16 2010 +0000 @@ -0,0 +1,105 @@ +#!/usr/bin/perl + +# generate pretty index.html from directory of .dsks +# AAW 4/5/10 + + +$dirtoget=$ARGV[0]; + +opendir(DSKD, $dirtoget) || die("Cannot open directory"); + +@dsks=readdir(DSKD); + +&header; + +print ""; + +print ""; + +foreach $dsk (sort @dsks) +{ + + if ($dsk =~ m/.*\.dsk$/) + { + @os9id = `os9 id $dirtoget/$dsk`; + + foreach $line (@os9id) + { + if ($line =~ m/Disk\sname\s+:\s+(.*)/) + { + $name = $1; + } + elsif ($line =~ m/Disk\sformat\s+:.*\((.*)\)/) + { + $format = $1; + } + elsif ($line =~ m/Creation\sdate\s+:\s+(.*)/) + { + $created = $1; + } + elsif ($line =~ m/Total\ssectors\s+:\s+(.*)/) + { + $sectors = $1; + } + + + } + + if ($dsk =~ m/_dw3[\._]/) + { + $format = "DriveWire 3/4"; + } + + $size = -s "$dirtoget/$dsk"; + + $size = int($size / 1024) . "k"; + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print "\r\n"; + + } +} + +print "
$dsk$name$size$created$sectors$format
"; + +&footer; + +closedir(DSKD); + + + + + +sub header +{ + print "Latest disk images"; + + print '"; + + print ""; + print "

NitrOS-9: Latest disk images

"; + +} + + +sub footer +{ + print ""; + + +} diff -r 5a29eed1ca2d -r 3dcda506604b makefile --- a/makefile Tue Apr 06 00:31:09 2010 +0000 +++ b/makefile Tue Apr 06 01:20:16 2010 +0000 @@ -27,6 +27,8 @@ # Copy DSK images dskcopy: all $(foreach dir, $(dirs), ($(CD) $(dir); make dskcopy);) + $(MKDSKINDEX) $(DSKDIR) > $(DSKDIR)/index.html + # Clean DSK images dskclean: @@ -46,4 +48,3 @@ make info>dsks/ReadMe $(ARCHIVE) nitros9project dsks/* scp nitros9project.zip boisy,nitros9@web.sourceforge.net:/home/groups/n/ni/nitros9/htdocs - diff -r 5a29eed1ca2d -r 3dcda506604b rules.mak --- a/rules.mak Tue Apr 06 00:31:09 2010 +0000 +++ b/rules.mak Tue Apr 06 01:20:16 2010 +0000 @@ -89,6 +89,7 @@ LINK = ln SOFTLINK = $(LINK) -s ARCHIVE = zip -D -j +MKDSKINDEX = $(NITROS9DIR)/3rdparty/utils/aaw/mkdskindex # Directories 3RDPARTY = $(NITROS9DIR)/3rdparty