summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbootstrap3
-rwxr-xr-xconfigure4
2 files changed, 3 insertions, 4 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`"
diff --git a/configure b/configure
index dbfec50..1162216 100755
--- a/configure
+++ b/configure
@@ -1,3 +1,3 @@
-#! /bin/sh
-cmake_source_dir=`echo $0 | sed -n '/\//{s/\/[^\/]*$//;p;}'`
+#!/bin/sh
+cmake_source_dir=`cd "\`dirname \"$0\"\`";pwd`
exec "${cmake_source_dir}/bootstrap" "$@"