Commit 28531d17 authored by Brad King's avatar Brad King

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.
parent d468145f
......@@ -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`"
......
#! /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" "$@"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment