Chapter4 profile

Simon Perreault nomis80 at hotpop.com
Thu Oct 5 12:38:31 PDT 2000


Jesse Tie Ten Quee wrote:
> > Nope. We still need some sort of loop. And one that will use some kind of
> > variable, like "for $variable in ... do ... cp $variable...
> 
> Please elaborate on this.

I mean, even if we don't use a loop for this particular case (creating
directories), we still NEED one. We will NEED a way to do loops, even if
we don't use any of them in the official profile. People will write
profiles, and maybe some of them will just NEED loops. I don't think that
repeating all the commands is going to solve the problem. What I'm
suggesting is not to use the sort of tag that Gerard used, the <for> and
<do> things. This is just an idea, probably not good:

<loop /* I'd like to see a tag named loop */

type="reiterate|variable|reiteratevariable"
	/* What these types mean:
	reiterate: do the loop n times, no need for a variable (like a basic
while loop)
	variable: do the loop 1 time for each variable (like a for loop)
	reiteratevariable: do the loop n times for each variable (combo) */

iterations="n"
	/* Conditional (ie. required if you specified a 'reiterate' type). To be
used with reiterate-type loops */

variable="var1,var2,var3"
	/* Conditional. These are the possible values for the variable, not the
name of the variable. The name of the variable is a predefined static one,
but the data is changed every n iterations. Please note that I've used
comas to separate variables, not spaces. I think this is more *ML
standard. */

>commands</loop>

This is a very simple loop, based on the logic of a loop, not on how bash
handles loops. This could be expanded. This is simply to show that loops
could be done otherwise.

And here comes my favourite finale:
As always, this is just my newbie advice.

-- Support your government, give Echelon / Carnivore something to parse --
classfield  top-secret government  restricted data information project CIA
KGB GRU DISA  DoD  defense  systems  military  systems spy steal terrorist
Allah Natasha  Gregori destroy destruct attack  democracy will send Russia
bank system compromise international  own  rule the world ATSC RTEM warmod
ATMD force power enforce  sensitive  directorate  TSP NSTD ORD DD2-N AMTAS
STRAP warrior-T presidental  elections  policital foreign embassy takeover
--------------------------------------------------------------------------

-- 
Unsubscribe: send email to alfs-profile-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message




More information about the alfs-discuss mailing list