From 861f6cb3460007a5e1504d4ee7d112cf0c54ebe5 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Thu, 10 Jun 2010 20:32:54 +0200 Subject: [PATCH] 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 --- ChangeLog | 4 ++++ bootstrap | 13 ++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) 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 -- 2.47.2