Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
common_bench
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
EIC
benchmarks
common_bench
Commits
08c97948
Commit
08c97948
authored
2 years ago
by
Wouter Deconinck
Browse files
Options
Downloads
Patches
Plain Diff
fix: allow unset REQUIRE_VAR
parent
b93589e9
No related branches found
No related tags found
1 merge request
!64
fix: allow unset REQUIRE_VAR
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/parse_cmd.sh
+11
-11
11 additions, 11 deletions
bin/parse_cmd.sh
with
11 additions
and
11 deletions
bin/parse_cmd.sh
+
11
−
11
View file @
08c97948
...
...
@@ -28,10 +28,10 @@ function print_the_help {
echo
" --pbeam Ion beam energy"
echo
" --minq2 Minimum momentum transfer"
echo
" --config Generator configuration identifiers (at least one)"
if
[
!
-z
${
REQUIRE_DECAY
}
]
;
then
if
[
!
-z
${
REQUIRE_DECAY
:-
}
]
;
then
echo
" --decay Specific decay particle (e.g. muon)."
fi
if
[
!
-z
${
REQUIRE_LEADING
}
]
;
then
if
[
!
-z
${
REQUIRE_LEADING
:-
}
]
;
then
echo
" --leading Leading particle of interest (e.g. jpsi)."
fi
echo
" -h,--help Print this message"
...
...
@@ -104,27 +104,27 @@ elif [ -z $PBEAM ]; then
echo
"ERROR: PBEAM not defined: --pbeam <energy>"
print_the_help
exit
1
elif
[
-z
$MINQ2
]
&&
[
!
-z
$REQUIRE_MINQ2
]
;
then
elif
[
-z
$MINQ2
]
&&
[
!
-z
$
{
REQUIRE_MINQ2
:-}
]
;
then
echo
"ERROR: MINQ2 not defined: --minq2 <energy>"
print_the_help
exit
1
elif
[
!
-z
$MINQ2
]
&&
[
-z
$REQUIRE_MINQ2
]
;
then
elif
[
!
-z
$MINQ2
]
&&
[
-z
$
{
REQUIRE_MINQ2
:-}
]
;
then
echo
"ERROR: MINQ2 flag specified but not required"
print_the_help
exit
1
elif
[
-z
$LEADING
]
&&
[
!
-z
$REQUIRE_LEADING
]
;
then
elif
[
-z
$LEADING
]
&&
[
!
-z
$
{
REQUIRE_LEADING
:-}
]
;
then
echo
"ERROR: LEADING not defined: --leading <channel>"
print_the_help
exit
1
elif
[
!
-z
$LEADING
]
&&
[
-z
$REQUIRE_LEADING
]
;
then
elif
[
!
-z
$LEADING
]
&&
[
-z
$
{
REQUIRE_LEADING
:-}
]
;
then
echo
"ERROR: LEADING flag specified but not required"
print_the_help
exit
1
elif
[
-z
$DECAY
]
&&
[
!
-z
$REQUIRE_DECAY
]
;
then
elif
[
-z
$DECAY
]
&&
[
!
-z
$
{
REQUIRE_DECAY
:-}
]
;
then
echo
"ERROR: DECAY not defined: --decay <channel>"
print_the_help
exit
1
elif
[
!
-z
$DECAY
]
&&
[
-z
$REQUIRE_DECAY
]
;
then
elif
[
!
-z
$DECAY
]
&&
[
-z
$
{
REQUIRE_DECAY
:-}
]
;
then
echo
"ERROR: DECAY flag specified but not required"
print_the_help
exit
1
...
...
@@ -134,12 +134,12 @@ fi
export
CONFIG
export
EBEAM
export
PBEAM
if
[
!
-z
$REQUIRE_MINQ2
]
;
then
if
[
!
-z
$
{
REQUIRE_MINQ2
:-}
]
;
then
export
MINQ2
fi
if
[
!
-z
$REQUIRE_LEADING
]
;
then
if
[
!
-z
$
{
REQUIRE_LEADING
:-}
]
;
then
export
LEADING
fi
if
[
!
-z
$REQUIRE_DECAY
]
;
then
if
[
!
-z
$
{
REQUIRE_DECAY
:-}
]
;
then
export
DECAY
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