Expand tilde used in command-line arguments

This enables one to specify e.g. --with-opm-core=~/opm/bld/opm-core
This commit is contained in:
Roland Kaufmann 2013-03-05 22:12:11 +01:00
parent 98fbb80fdc
commit 7104ac7dae

2
configure vendored
View File

@ -133,6 +133,8 @@ while getopts -- ":-:" optchar; do
CMAKE_COMMAND="${pkgloc}"
break
fi
# tilde expansion; quote safely before running eval on it
eval pkgloc=$(printf "%q" "${pkgloc}")
# expand to full path since CMake changes to source directory (!)
# this also normalize the path name wrt. not having a trailing slash
pkgloc=$(test -d "${pkgloc}" && sh -c "cd \"${pkgloc}\"; pwd")