Skip to content
Snippets Groups Projects
Commit c273ad93 authored by Christian Engwer's avatar Christian Engwer
Browse files

fix issue #339

[[Imported from SVN: r5048]]
parent f5ec507d
Branches
Tags
No related merge requests found
......@@ -311,7 +311,6 @@ usage () {
# create the module list
create_module_list() {
find_modules_in_path
export FOUND_MODULES=$MODULES
if test "x$MODULE" = "x"; then
sort_modules $MODULES
else
......@@ -459,9 +458,7 @@ case "$command" in
;;
export)
create_module_list
if test x. = x$DUNE_CONTROL_PATH; then
DUNE_CONTROL_PATH=""
fi
DUNE_CONTROL_PATH=""
for mod in $MODULES; do
if test x != x$DUNE_CONTROL_PATH; then
export DUNE_CONTROL_PATH="$DUNE_CONTROL_PATH:$(eval echo \$PATH_$mod/dune.module)"
......@@ -470,7 +467,10 @@ case "$command" in
fi
done
echo export DUNE_CONTROL_PATH=$DUNE_CONTROL_PATH
;;
;;
unexport)
echo export DUNE_CONTROL_PATH=""
;;
help)
usage
;;
......
......@@ -78,12 +78,15 @@ parse_control() {
# search for modules in each directory in DUNE_CONTROL_PATH
#
find_modules_in_path() {
# foreach dir in $@
while read dir; do
find_modules $dir
done <<EOF
$(echo $DUNE_CONTROL_PATH | sed -e 's/:/\n/g')
if test -z "$FOUND_MODULES"; then
# foreach dir in $@
while read dir; do
find_modules $dir
done <<EOF
$(echo $DUNE_CONTROL_PATH | sed -e 's/:/\n/g')
EOF
fi
export FOUND_MODULES=$MODULES
}
#
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment