lh_clean rewrite with functions

2007-11-19 Thread Fathi Boudra
Hi, after falling on : sudo lh_clean lh_clean: unrecognized option `--chroot' i looked at lh_clean and find cleaner to rewrite it with functions. Maybe applicable somewhere else... cheers, Fathi lh_clean Description: application/shellscript ___

Re: lh_clean rewrite with functions

2007-11-19 Thread Justin Pryzby
On Mon, Nov 19, 2007 at 03:15:20PM +0100, Fathi Boudra wrote: Hi, after falling on : sudo lh_clean lh_clean: unrecognized option `--chroot' i looked at lh_clean and find cleaner to rewrite it with functions. Maybe applicable somewhere else... You can also do something like while [ $#

Re: lh_clean rewrite with functions

2007-11-19 Thread Fathi Boudra
You can also do something like while [ $# -ne 0 ] do arg=$1 case $1 in [^-]*) break ;; --clean|--purge|--stage|--source|...) f=${arg#--} $f ;; --otheroption) shift

Re: lh_clean rewrite with functions

2007-11-19 Thread Daniel Baumann
Fathi Boudra wrote: btw, it doesn't resolve the issue ;) it's because Arguments are not properly handled to allow local arguments. quick fix uploaded as 1.0~a37-2. -- Address:Daniel Baumann, Burgunderstrasse 3, CH-4562 Biberist Email: [EMAIL PROTECTED] Internet: