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
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
Timo Koch
dune-common
Commits
cd37f959
Commit
cd37f959
authored
18 years ago
by
Christian Engwer
Browse files
Options
Downloads
Patches
Plain Diff
fixed bashism
[[Imported from SVN: r4720]]
parent
22fbe294
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bin/dunecontrol
+3
-3
3 additions, 3 deletions
bin/dunecontrol
bin/dunemodules.inc
+10
-10
10 additions, 10 deletions
bin/dunemodules.inc
with
13 additions
and
13 deletions
bin/dunecontrol
+
3
−
3
View file @
cd37f959
...
...
@@ -44,12 +44,12 @@ fi
# $1 command to execute
#
build_modules
()
{
command
=
$1
command
=
"
$1
"
load_opts
$command
local
runcommand
=
run_
$command
modules
=
$MODULES
modules
=
"
$MODULES
"
if
test
x
"
$ONLY
"
!=
x
;
then
modules
=
$ONLY
modules
=
"
$ONLY
"
fi
for
module
in
$modules
;
do
local
path
=
$(
eval
"echo
\$
PATH_
${
module
}
"
)
...
...
This diff is collapsed.
Click to expand it.
bin/dunemodules.inc
+
10
−
10
View file @
cd37f959
...
...
@@ -24,14 +24,14 @@ parse_control() {
exit
1
fi
# read parameters from control file
local
name
=
$
(
echo
$
(
grep
Module
:
"$1"
|
cut
-
d
':'
-
f2
))
local
name
=
"
$(echo $(grep Module: "
$
1
" | cut -d ':' -f2))
"
if
test
"x
$name
"
=
"x"
;
then
echo
"ERROR:
$CONTROL
files $1 does not contain a Module entry"
exit
1
fi
local
deps
=
$
(
echo
$
(
grep
Depends
:
"$1"
|
cut
-
d
':'
-
f2
))
local
sugs
=
$
(
echo
$
(
grep
Suggests
:
"$1"
|
cut
-
d
':'
-
f2
))
local
path
=
$
(
dirname
"$1"
)
local
deps
=
"
$(echo $(grep Depends: "
$
1
" | cut -d ':' -f2))
"
local
sugs
=
"
$(echo $(grep Suggests: "
$
1
" | cut -d ':' -f2))
"
local
path
=
"
$(dirname "
$
1
")
"
# create and check variable name from module name
fix_and_assign
module
$name
if
!
check_modname
"
$module
"
;
then
...
...
@@ -75,7 +75,7 @@ EOF
#
find_modules() {
if
test
-
d
"$1"
;
then
local
dir
=
$
(
cd
"$1"
&&
pwd
)
local
dir
=
"
$(cd "
$
1
" && pwd)
"
while
read
m
;
do
if
test
"x
$m
"
!=
"x"
;
then
export
module
=
""
...
...
@@ -110,7 +110,7 @@ sort_modules() {
exit
1
fi
done
export
MODULES
=
$SORTEDMODULES
export
MODULES
=
"
$SORTEDMODULES
"
}
#
...
...
@@ -121,7 +121,7 @@ sort_modules() {
# $1 name of the modules
#
_sort_module() {
local
module
=
$
1
local
module
=
"
$1
"
shift
1
if
!
check_modname
$module
;
then
echo
"ERROR: invalid module name
$module
"
;
exit
1
;
fi
if
test
"x$(eval echo
\$
SORT_DONE_${command}_${module})"
!=
"xyes"
;
then
...
...
@@ -157,8 +157,8 @@ _sort_module() {
# $2 full path of the $CONTROL file
#
eval_control() {
local
command
=
$
1
local
file
=
$
2
local
command
=
"
$1
"
local
file
=
"
$2
"
shift
2
if
test
-
f
"
$file
"
;
then
# open subshell
...
...
@@ -185,7 +185,7 @@ eval_control() {
# $2 value
#
fix_and_assign() {
local
name
=
$
1
local
name
=
"
$1
"
shift
1
if
!
check_modname
$name
;
then
echo
ERROR
:
error
in
assignment
.
$name
is
not
a
valid
variabel
name
.
...
...
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