Assume that all paths to modules are directories

Old implementation had a problem with the special case that you
specified a directory directly under the root (e.g. /usr); dirname
adds a trailing slash in that case.
This commit is contained in:
Roland Kaufmann 2013-01-09 10:37:49 +01:00
parent 4eb1a07759
commit dcba0c32bd

3
configure vendored
View File

@ -84,7 +84,8 @@ while getopts -- ":-:" optchar; do
# get the location of the package; everyhing after equal sign
pkgloc=${OPTARG#*=}
# expand to full path since CMake changes to source directory (!)
pkgloc=$(echo $(sh -c "cd $(dirname ${pkgloc}); pwd")/$(basename ${pkgloc}))
# this also normalize the path name wrt. not having a trailing slash
pkgloc=$(sh -c "cd \"${pkgloc}\"; pwd")
# packages need different suffix for their root (sic)
case "${pkgname}" in
agmg |\