Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Nemo
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sam Hatfield
Nemo
Commits
76db00fb
Commit
76db00fb
authored
2 years ago
by
Sebastien Masson
Browse files
Options
Downloads
Patches
Plain Diff
improve the robustness of -n/r/a options in makenemo, #68
parent
4dbfc9bb
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
makenemo
+16
-4
16 additions, 4 deletions
makenemo
sette/sette.sh
+1
-1
1 addition, 1 deletion
sette/sette.sh
with
17 additions
and
5 deletions
makenemo
+
16
−
4
View file @
76db00fb
...
@@ -223,11 +223,23 @@ done
...
@@ -223,11 +223,23 @@ done
if
[
-n
"
$x_name
"
]
# is the configuration existing in cfgs or tests? or is it a new conf?
if
[
-n
"
$x_name
"
]
# is the configuration existing in cfgs or tests? or is it a new conf?
then
then
incfg
=
$(
find
$CFGS_DIR
-type
d
-name
$x_name
|
wc
-l
)
# this configuration exists in CFGS_DIR
incfg
=
$(
find
$CFGS_DIR
-type
d
-name
$x_name
|
wc
-l
)
# this configuration exists in CFGS_DIR
intst
=
$(
find
$TESTS_DIR
-type
d
-name
$x_name
|
wc
-l
)
# this configuration exists in TESTS_DIR
intst
=
$(
find
$TESTS_DIR
-type
d
-name
$x_name
|
wc
-l
)
# this configuration exists in TESTS_DIR
[[
$incfg
-eq
0
&&
$intst
-eq
0
]]
&&
x_n
=
$x_name
# this is a new configuration -> dedine/overwrite x_n
if
[
$((
$incfg
+
$intst
))
-eq
2
]
;
then
[[
$incfg
-eq
1
&&
-z
"
$x_r
"
]]
&&
x_r
=
$x_name
# this is a reference configuration -> dedine/overwrite x_r
echo
-e
"
\0
33[0;31m
\n
ERROR: the
$x_name
directory is found twice: in
$CFGS_DIR
and in
$TESTS_DIR
\0
33[0m
\n
"
[[
$intst
-eq
1
&&
-z
"
$x_a
"
]]
&&
x_a
=
$x_name
# this is a test configuration -> dedine/overwrite x_a
exit
4
fi
if
[
$((
$incfg
+
$intst
))
-gt
0
]
;
then
[
-n
"
$x_r
"
]
&&
echo
-e
"
\n
WARNING:
$x_name
configuration is already existing, we ignore
\"
-r
$x_r
\"\n
"
[
-n
"
$x_a
"
]
&&
echo
-e
"
\n
WARNING:
$x_name
configuration is already existing, we ignore
\"
-a
$x_a
\"\n
"
fi
if
[
$incfg
-eq
1
]
;
then
x_r
=
$x_name
;
x_a
=
''
# reference configuration existing -> define/overwrite x_r
elif
[
$intst
-eq
1
]
;
then
x_a
=
$x_name
;
x_r
=
''
# test configuration existing -> define/overwrite x_a
else
x_n
=
$x_name
# this is a new configuration -> define
fi
fi
fi
export
NEW_CONF
=
${
x_n
}
export
NEW_CONF
=
${
x_n
}
...
...
This diff is collapsed.
Click to expand it.
sette/sette.sh
+
1
−
1
View file @
76db00fb
...
@@ -166,7 +166,7 @@ if [ $# -gt 0 ]; then
...
@@ -166,7 +166,7 @@ if [ $# -gt 0 ]; then
echo
' for SETTE-built configurations (needed if sette.sh invocations may overlap)'
echo
' for SETTE-built configurations (needed if sette.sh invocations may overlap)'
echo
'-r to execute without waiting to run sette_rpt.sh at the end (useful for chaining sette.sh invocations)'
echo
'-r to execute without waiting to run sette_rpt.sh at the end (useful for chaining sette.sh invocations)'
echo
'-y to perform a dryrun to simply report what settings will be used'
echo
'-y to perform a dryrun to simply report what settings will be used'
echo
'-
d
to compile Nemo with debug options (only if %DEBUG_FCFLAGS if defined in your arch file)'
echo
'-
b
to compile Nemo with debug options (only if %DEBUG_FCFLAGS if defined in your arch file)'
echo
'-c to clean each configuration'
echo
'-c to clean each configuration'
echo
'-s to synchronise the sette MY_SRC and EXP00 with the reference MY_SRC and EXPREF'
echo
'-s to synchronise the sette MY_SRC and EXP00 with the reference MY_SRC and EXPREF'
echo
'-u to run sette.sh without any user interaction. This means no checks on creating'
echo
'-u to run sette.sh without any user interaction. This means no checks on creating'
...
...
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