geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <david.blev...@visi.com>
Subject Re: Eclipse issue -- maven eclipse - David's bash loop
Date Wed, 12 May 2004 19:57:20 GMT
On Wed, May 12, 2004 at 04:35:55PM +0200, Ralf Barkow wrote:
> 
> As David's bash loop didn't worked for me with Cygwin,
> I post a modified version. Now I'm looking for a current
> .launch file to be able to debug in ecplise. Anyone?

I looked for '.launch' files on my system but didn't find any.  I'm
using 3.0 M5.

> 
> --- schnipp ---
> 
> #!/usr/bin/bash
> for modules in "$(find ./*/ -name project.xml | sed 's/project.xml//')"; do
>    echo $modules;
>    for module in $modules
>    do
>      pushd $module &> /dev/null
>      maven eclipse > /dev/null
>      popd &> /dev/null
>    done;
> done;
> 
> --- schnapp ---

Aha, I see the issue; the quoting around the $() subprocess is causing the loop to see it
as one big entry.  That's why you added the second loop--to do the job the first one should
have done.

modules="$(find ./*/ -name project.xml | sed 's/project.xml//')";

for module in $modules; do
   pushd $module &> /dev/null
   maven eclipse > /dev/null
   popd &> /dev/null
done;

That should work the same as the other, but be less missleading as to how many loops there
actually are.

-David

Mime
View raw message