Ben Caradoc-Davies ha scritto:
> I have seen exactly this behaviour running find locally. It has always
> bugged me, even though it works. Now I have the solution: use the find
> -depth flag.
>
> What is going on is that:
> (1) find locates a matching directory
> (2) runs your arbitrary command on it
> (3) descends into the matching directory looking for more matching
> directories.
> Unfortunately, because (2) removes the directory, (3) fails. The find
> continues, but returns a failure error code. The solution is to add
> -depth as the first non-path argument to find to cause it to process the
> contents of each directory before the directory itself (i.e. depth first).
Aaah!
> For example:
>
> $ mkdir -p a/b
> $ find . -name a -exec rm -rf {} \;
> find: `./a': No such file or directory
> $ echo $?
> 1
>
> (Return code 1 is a failure.)
>
> $ mkdir -p a/b
> $ find . -depth -name a -exec rm -rf {} \;
> $ echo $?
> 0
>
> (Return code 0 is a success.)
>
> Success!
Brilliant, Hudson is working fine now!
Thanks a lot
Cheers
Andrea
--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel