Andrew Hoying wrote:

> what if we modified the script like so...

Ahhhh.... code.... time to sharpen the chain saw :-)

Permit me...

> #!/bin/sh
> 
> cd $PACKAGES
> for i in `ls *.lrp`

More succinct (and doesn't require loading ls):

for i in *.lrp

> do
> echo $i
> tar xzf $i var/lib/lrpkg
> cd var/lib/lrpkg
> rootpkg=`echo $i|sed 's/.lrp//'`

More succinct (and doesn't require a pipe or loading of big ol' sed):

rootpkg=${i%%.lrp}

> [ -f $rootpkg.version ] && mv $rootpkg.help $rootpkg.`head -n1
> $rootpkg.version`.help
> cd $PACKAGES

Since one was in the $PACKAGES directory to start with, you could
shorten this to:

cd -

To go back where you came from....

> done
> 
> mv var/lib/lrpkg/*.help .
> rm -rf var/lib/lrpkg

_______________________________________________
Leaf-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/leaf-devel

Reply via email to