On 26 Sep 2003 01:29:54 -0700, Paul Eggert wrote: > Eric Sunshine <sunshine@xxxxxxxxxxxxxx> writes: > > The existing implementation leaves a bogus directory named > > "-p" sitting in the working directory. > I installed this. > [if mkdir -p . 2>/dev/null; then > as_mkdir_p=: > else > + rm -fr ./-p > as_mkdir_p=false > fi > ])# _AS_MKDIR_P_PREPARE This works. Note that it works because `mkdir' complains that `.' already exists, thus the `else' clause is invoked; as opposed to working on account of `mkdir' complaining about `-p' (it does not complain). Placing the `rm' outside the conditional seemed (to me) safer overall, but your approach works correctly for this case. > > 2) _AS_MKDIR_P_PREPARE neglects to take advantage of the older `mkdirs' > > command > The existing code runs correctly on these ancient hosts, doesn't it? > If so, I wouldn't bother with this part of the patch. We don't need > to optimize for ancient hosts. Yes, the existing code runs correctly. Indeed, `mkdirs' was an optimization. Thank you for installing the patch. -- ES