summaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorAlexandre Duret-Lutz <adl@gnu.org>2003-02-24 14:34:58 +0000
committerAlexandre Duret-Lutz <adl@gnu.org>2003-02-24 14:34:58 +0000
commit6a5c8a294d4fe0b5af16c6e689a1ea72f4191aed (patch)
tree8d5f759aa04476e34d9c8d42a981caff900d13bc /bootstrap
parentb1ba945c3e62b53735595bce3a61a6bd075ecf68 (diff)
downloadautomake-6a5c8a294d4fe0b5af16c6e689a1ea72f4191aed.tar.gz
auto-detect the path separator; patch from Richard Dawe
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap12
1 files changed, 11 insertions, 1 deletions
diff --git a/bootstrap b/bootstrap
index 3d6267e48..c0595697a 100755
--- a/bootstrap
+++ b/bootstrap
@@ -19,6 +19,16 @@
# along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# 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
+ PATH_SEPARATOR=:
+fi
+rm -f boot$$.sh
# Don't ignore failures
set -e
@@ -26,7 +36,7 @@ set -e
# Find perl. Code based on Autoconf, but without non-POSIX support.
if test -z "$PERL"; then
save_IFS=$IFS
- IFS=:
+ IFS=$PATH_SEPARATOR
for dir in $PATH; do
IFS=$save_IFS
test -z "$dir" && dir=.