I thought I had sent this before, but I'm not sure I did... Sorry if
it's a duplicate.
On Dec 15, 2000, Akim Demaille <[EMAIL PROTECTED]> wrote:
> +if ls a.* >/dev/null 2>&1; then
> + rm -rf conftestdir
> + mkdir conftestdir
> + mv a.* conftestdir
> +fi
[snip]
> +if test -d conftestdir; then
> + mv conftestdir/* .
> + rm -rf conftestdir
> +fi
Note that if conftestdir exists in the beginning and there aren't any
a.* files in the current directory, you'll end up moving the contents
of conftestdir to the current directory at the end. Better rm -rf it
up-front, unconditionally.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me