[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MSYS ln -s to directory
From: |
Ralf Wildenhues |
Subject: |
Re: MSYS ln -s to directory |
Date: |
Sat, 08 Apr 2006 18:22:26 +0200 |
Hi Noah,
Thanks for the review!
Noah Misch writes:
On Thu, Apr 06, 2006 at 08:01:41PM +0200, Ralf Wildenhues wrote:
The `rm -f conf$$.dir' at the beginning (rather than a rmdir or rm -rf)
is on purpose: if someone has such a leftover file, I'd like to know
(plus I'm real nervous about any occurrences of `rm -rf').
Perhaps this motive deserves a comment in the code? I probably would have
chalked that up to a typo, had you not explained it.
I cleaned that up now: test for directory, if no, then `rm -f' and mkdir,
if yes, then only `rm -f' the file that will be the link target.
m4_defun([_AS_LN_S_PREPARE],
-[rm -f conf$$ conf$$.exe conf$$.file
+[rm -f conf$$ conf$$.exe conf$$.file conf$$.dir
Shouldn't you redirect 2>/dev/null, so the user sees no diagnostic when
conf$$.dir exists and is a directory?
Should not be necessary any more. Any leftover diagnostics should be
a sign for a genuine issue with the macro code, I believe.
+test -d conf$$.dir || mkdir conf$$.dir
If, here, the directory already exists, ...
+rmdir conf$$.dir
... it might still contain something. Maybe 2>/dev/null here, too?
Yes. New version attached, tested on MinGW (selects cp -p) and Cygwin
(selects ln -s) now. OK?
Cheers,
Ralf
ln-s-msys.diff
Description: Text document
- Re: [Mingw-users] MSYS ln -s to directory, Ralf Wildenhues, 2006/04/06
- Re: [Mingw-users] MSYS ln -s to directory, Noah Misch, 2006/04/07
- Re: MSYS ln -s to directory,
Ralf Wildenhues <=
- Re: MSYS ln -s to directory, Noah Misch, 2006/04/09
- Re: MSYS ln -s to directory, Ralf Wildenhues, 2006/04/10
- Re: MSYS ln -s to directory, Stepan Kasal, 2006/04/10
- Re: MSYS ln -s to directory, Ralf Wildenhues, 2006/04/11
- Re: [Mingw-users] Re: MSYS ln -s to directory, Keith MARSHALL, 2006/04/11
- Re: [Mingw-users] Re: MSYS ln -s to directory, Ralf Wildenhues, 2006/04/11
- Re: [Mingw-users] Re: MSYS ln -s to directory, Keith MARSHALL, 2006/04/11
- Re: [Mingw-users] Re: MSYS ln -s to directory, Ralf Wildenhues, 2006/04/11
- Re: [Mingw-users] Re: MSYS ln -s to directory, Keith MARSHALL, 2006/04/11
- Re: [Mingw-users] Re: MSYS ln -s to directory, Paul Eggert, 2006/04/11