diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2010-06-10 20:32:54 +0200 |
---|---|---|
committer | Ralf Wildenhues <Ralf.Wildenhues@gmx.de> | 2010-06-11 06:31:38 +0200 |
commit | 861f6cb3460007a5e1504d4ee7d112cf0c54ebe5 (patch) | |
tree | 2ad0829ce7c86df2fe50c4915f9aca17addfa27e /bootstrap | |
parent | 4a09e5e9c3e5c8a5a4bdbb7d9cd24052ec018cb9 (diff) | |
download | automake-861f6cb3460007a5e1504d4ee7d112cf0c54ebe5.tar.gz |
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 <Ralf.Wildenhues@gmx.de>
Diffstat (limited to 'bootstrap')
-rwxr-xr-x | bootstrap | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -20,15 +20,14 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # 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 |