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:
parent
98fbb80fdc
commit
7104ac7dae
2
configure
vendored
2
configure
vendored
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user