"Jeff Black" <[EMAIL PROTECTED]> writes:

> How difficult would it be to create a 2nd text file when first
> executing todo.pl --go for use to keep track of where we are as far
> as progress. I am thinking something along the lines of this (ugly
> pseudo-code follows):
> 
> Todo.pl --go
> If exist c:\netinst\todo.txt copy c:\netinst\todo.txt c:\netinst\progress.txt
> (insert fancy perl stuff here, count the lines in progress.txt,
> replace the existing lines:
>
> foo
> bar
> foobar
> foobar2
> 
> With
> 
> 1
> 2
> 3
> 4
> 
> Then when todo.pl removes a line from todo.txt ALSO remove a line
> from progress.txt.
> 
> The benefit of this being that within perl we can read in the 1st
> line of progress.txt and the last line of progress.txt and KNOW that
> we are on step (5 of 20).

I can think of two problems with this.

First, keeping the same state in two places like this is usually a bad
idea.  Right now, you can just edit todo.txt (either with notepad or
by running todo.pl manually) and run "todo.pl --go" and everything
works as you would expect.

Second, the todo.txt file both grows and shrinks during the
installation.  So, it might look something like this:

    winxpsp1-updates.bat

...but when winxpsp1-updates.bat runs, it will push 20-30 new commands
onto the to-do list.  So "step 1 of 1" becomes "step 2 of 30".

That said, I still kind of like this idea.  I would propose
implementing it like this.  We create a "C:\netinst\done.txt" list
which enumerates the commands we have actually executed.  (Every time
todo.pl executes a command, it appends it to done.txt.)

Then we modify todo.pl to display the number of lines in todo.txt and
the number of lines in done.txt.  This would provide at least some
(incomplete) information about idea where we are in the big picture,
and it would not be very expensive.

I will look at implementing this sometime.

 - Pat


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
unattended-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/unattended-devel

Reply via email to