From 8d75131f165f1f19493bccb859ed184cfe695b87 Mon Sep 17 00:00:00 2001 From: Christian Engwer <christi@dune-project.org> Date: Fri, 20 May 2011 13:24:13 +0000 Subject: [PATCH] [dunecontrol] - correctly merge installed modules into the DUNE_CONTROL_PATH - Fix FS#901 [[Imported from SVN: r6449]] --- bin/dunecontrol | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/bin/dunecontrol b/bin/dunecontrol index b846e8b9e..19a784f57 100755 --- a/bin/dunecontrol +++ b/bin/dunecontrol @@ -671,13 +671,22 @@ case "$command" in create_module_list 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)" + path=$(eval echo \$PATH_$mod) + name=$(eval echo \$NAME_$mod) + if test -f $p/dune.module; then + export DUNE_CONTROL_PATH="$DUNE_CONTROL_PATH:$p/dune.module" else - export DUNE_CONTROL_PATH="$(eval echo \$PATH_$mod/dune.module)" + if test -f "$path/lib/dunecontrol/$name/dune.module"; then + export DUNE_CONTROL_PATH="$DUNE_CONTROL_PATH:$path/lib/dunecontrol/$name/dune.module" + else + echo "ERROR: while creating list of dune.module files" >&2 + echo " couldn't find dune.module file for $name in $path" >&2 + echo >&2 + exit 1 + fi fi done - echo export DUNE_CONTROL_PATH=$DUNE_CONTROL_PATH + echo export DUNE_CONTROL_PATH=$(echo $DUNE_CONTROL_PATH | sed -e 's/^://') ;; printdeps) find_modules_in_path -- GitLab