Skip to content

Commit

Permalink
Simplify bootstrap script source dir detection
Browse files Browse the repository at this point in the history
This teaches the bootstrap shell script to detect the CMake source
directory from which it is executed using a simpler idiom.
  • Loading branch information
bradking committed Sep 25, 2009
1 parent d468145 commit 28531d1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -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`"
Expand Down
4 changes: 2 additions & 2 deletions configure
Original file line number Diff line number Diff line change
@@ -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" "$@"

0 comments on commit 28531d1

Please sign in to comment.