Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Core Modules
dune-common
Commits
71ef66c8
Commit
71ef66c8
authored
14 years ago
by
Christian Engwer
Browse files
Options
Downloads
Patches
Plain Diff
allow to set DUNE_CONTROL_PATH in the OPTS file
[[Imported from SVN: r6246]]
parent
57ded251
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/dunemodules.lib
+21
-9
21 additions, 9 deletions
lib/dunemodules.lib
with
21 additions
and
9 deletions
lib/dunemodules.lib
+
21
−
9
View file @
71ef66c8
...
...
@@ -13,14 +13,6 @@ CONTROL="dune.module"
### check for environment variables
###
if
test
-z
$DUNE_CONTROL_PATH
;
then
DUNE_CONTROL_PATH
=
.
for
i
in
/usr/local/lib/dunecontrol/ /usr/lib/dunecontrol/
;
do
if
test
-d
$i
;
then
DUNE_CONTROL_PATH
=
$DUNE_CONTROL_PATH
:
$i
fi
done
fi
if
test
-z
$GREP
;
then
GREP
=
grep
fi
...
...
@@ -144,10 +136,30 @@ parse_control() {
done
}
#
# try to setup the control path
#
setup_control_path
()
{
if
test
-z
$DUNE_CONTROL_PATH
;
then
DUNE_CONTROL_PATH
=
.
for
i
in
/usr/local/lib/dunecontrol/ /usr/lib/dunecontrol/
;
do
if
test
-d
$i
;
then
DUNE_CONTROL_PATH
=
$DUNE_CONTROL_PATH
:
$i
fi
done
fi
# try to read DUNE_CONTROL_PATH from OPTS file
if
test
-n
"
$DUNE_OPTS_FILE
"
;
then
DUNE_CONTROL_PATH
=
"
$(
.
$DUNE_OPTS_FILE
;
eval echo
$DUNE_CONTROL_PATH
)
"
fi
export
DUNE_CONTROL_PATH
}
#
# search for modules in each directory in DUNE_CONTROL_PATH
#
find_modules_in_path
()
{
setup_control_path
if
test
-z
"
$FOUND_MODULES
"
;
then
# foreach dir in $@
while
read dir
;
do
...
...
@@ -161,7 +173,7 @@ EOFM
find_modules
$dir
fi
done
<<
EOF
$(
echo
$DUNE_CONTROL_PATH
|
tr
':'
'\n'
)
$(
echo
$DUNE_CONTROL_PATH
|
sed
-e
's/:\+/:/g'
|
tr
':'
'\n'
)
EOF
export
FOUND_MODULES
=
"
$MODULES$INSTMODULES
"
fi
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment