This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi, On Tue, May 18, 2010 at 6:57 PM, Titus von Boxberg <titus@v9g.de> wrote: > Am 19.05.2010 um 00:48 schrieb Yann E. MORIN: >> Arnaud, Titus, All, >> >> On Tuesday 18 May 2010 22:40:05 Arnaud Lacombe wrote: >>> On Mon, May 17, 2010 at 8:27 AM, Titus von Boxberg <titus@v9g.de> wrote: >>>> - ? ? ? ? ? ?if [ "$( LANG=C stat -c '%F' "${_t}" )" != "symbolic link" ]; then >>>> + ? ? ? ? ? ?if [ -z "`readlink ${_t}`" ]; then >> >>> hum, test(1) tells me: >>> ? ? ? -h FILE >>> ? ? ? ? ? ? ?FILE exists and is a symbolic link (same as -L) >>> I think this is what is intended to be done, no ? >> >> Yes, and it is in POSIX.1-2008. Plain and simple. >> Titus, can you check if test(1) on BSD/MacOS is conformant ? > Yann, Arnaud, All, > > yes, test is way more nifty! > > However, man test says to -h: > True if file exists and is a symbolic link. ?This operator is retained for compatibility with previous versions of > this program. Do not rely on its existence; use -L instead. > > I'd opt for -L > NetBSD test(1) says about -L: -L file True if file exists and is a symbolic link. This operator is retained for compatibility with previous versions of this program. Do not rely on its existence; use -h instead. POSIX has the same description for both entries, without saying if one is the deprecated version of the other. Though, -L would be more intuitive. - Arnaud -- For unsubscribe information see http://sourceware.org/lists.html#faq
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |