From: Stefano Lattarini Date: Thu, 10 Jun 2010 18:32:54 +0000 (+0200) Subject: Improve determination of PATH separator in bootstrap script. X-Git-Tag: v1.11.1b~76^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=861f6cb3460007a5e1504d4ee7d112cf0c54ebe5;p=thirdparty%2Fautomake.git Improve determination of PATH separator in bootstrap script. * bootstrap: Detemine what the PATH separator is the same way autoconf does. Signed-off-by: Ralf Wildenhues --- diff --git a/ChangeLog b/ChangeLog index d8623b280..c2d62cfbe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2010-06-11 Stefano Lattarini + Improve determination of PATH separator in bootstrap script. + * bootstrap: Detemine what the PATH separator is the same way + autoconf does. + Minor improvements in bootstrap script. * bootstrap: Consistently use two-spaces indentation. Cosmetic improvement to comments. diff --git a/bootstrap b/bootstrap index 2e4bedcb1..7766bd3e8 100755 --- a/bootstrap +++ b/bootstrap @@ -20,15 +20,14 @@ # along with this program. If not, see . # Find the path separator. -echo "#! /bin/sh" >boot$$.sh -echo "exit 0" >>boot$$.sh -chmod +x boot$$.sh -if (PATH="/nonexistent;."; boot$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' -else +# (Snippet copied from configure's initialization in Autoconf 2.65) +if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi -rm -f boot$$.sh # Don't ignore failures. set -e