summaryrefslogtreecommitdiffstats
path: root/bootstrap
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-09-25 14:48:24 (GMT)
committerBrad King <brad.king@kitware.com>2009-09-25 14:48:24 (GMT)
commit28531d17072d363eafb0b7de1946a7cffef2f6f0 (patch)
tree248c6268dedfcfa423a0d047e0f1e4a074181ace /bootstrap
parentd468145fa2e5abbba2b9f6ea32eab206738312b4 (diff)
downloadCMake-28531d17072d363eafb0b7de1946a7cffef2f6f0.zip
CMake-28531d17072d363eafb0b7de1946a7cffef2f6f0.tar.gz
CMake-28531d17072d363eafb0b7de1946a7cffef2f6f0.tar.bz2
Simplify bootstrap script source dir detection
This teaches the bootstrap shell script to detect the CMake source directory from which it is executed using a simpler idiom.
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap3
1 files changed, 1 insertions, 2 deletions
diff --git a/bootstrap b/bootstrap
index 673bd67..ea32b89 100755
--- a/bootstrap
+++ b/bootstrap
@@ -34,8 +34,7 @@ cmake_date_stamp_component()
# Detect system and directory information.
cmake_system=`uname`
-cmake_source_dir=`echo $0 | sed -n '/\//{s/\/[^\/]*$//;p;}'`
-cmake_source_dir=`(cd "${cmake_source_dir}";pwd)`
+cmake_source_dir=`cd "\`dirname \"$0\"\`";pwd`
cmake_binary_dir=`pwd`
cmake_version_major="`cmake_version_component MAJOR`"
cmake_version_minor="`cmake_version_component MINOR`"