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

dunecontrol now supports a DUNE_CONTROL_PATH environment variable.

The variable contains a colon seperated list of directories where
dunecontrol searchs recursively for dune.module files.

You can specify the variable
i.e.

export DUNE_CONTROL_PATH=~/AllMyFancyDuneProjects:~/DirectoryContainingTheDuneModules

dunecontrol will now search for dune.module files in ~/AllMyFancyDuneProjects and
~/DirectoryContainingTheDuneModules


[[Imported from SVN: r4654]]
parent 76528bbf
Branches
Tags
No related merge requests found
......@@ -285,7 +285,7 @@ done
eval '
case "$command" in
'$(echo $COMMANDS | sed -e 's/ \+/ | /g')')
find_modules .
find_modules_in_path
if test "x$MODULE" = "x"; then
sort_modules $MODULES
else
......@@ -296,7 +296,7 @@ case "$command" in
echo "--- done ---"
;;
print)
find_modules .
find_modules_in_path
if test "x$MODULE" = "x"; then
sort_modules $MODULES
else
......
......@@ -55,6 +55,18 @@ parse_control() {
fix_and_assign SUGS_${module} "$sugs"
}
#
# 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')
EOF
}
#
# search a directory recursively for $CONTROL files
#
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment