On 2/19/07, Bruce Dubbs <[EMAIL PROTECTED]> wrote: > Dan Nicholson wrote: > > > First patch is to eliminated "echo -[en]" since it's not always > > supported by POSIX shells. I chose to use printf since it was a > > builtin in dash. I didn't notice until later that it's not mentioned > > in POSIX. And the executable printf is in /usr/bin. We can maintain > > the same "echo -[en]" syntax by switching in /bin/echo everywhere, > > too. > > I prefer using /bin/echo. I wonder if there would be a test to see if > echo -[en] works or not and then: > > if (works) ECHO=echo > else ECHO=/bin/echo > > and then use $ECHO everywhere.
Excellent idea. What's below seems to work. A more complete test can be found near the beginning of any autoconf generated configure script, but it doesn't really fit our usage pattern. case `echo -en "test"` in -en*) ECHO=/bin/echo ;; *) ECHO=echo ;; esac -- Dan -- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page