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
0d9b5289
Commit
0d9b5289
authored
2 years ago
by
Wouter Deconinck
Browse files
Options
Downloads
Patches
Plain Diff
fix: set LEADING, allow undefined throughout
parent
000cbc49
No related branches found
No related tags found
1 merge request
!66
fix: set LEADING, allow undefined throughout
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/parse_cmd.sh
+16
-13
16 additions, 13 deletions
bin/parse_cmd.sh
with
16 additions
and
13 deletions
bin/parse_cmd.sh
+
16
−
13
View file @
0d9b5289
...
@@ -26,13 +26,15 @@ function print_the_help {
...
@@ -26,13 +26,15 @@ function print_the_help {
echo
"REQUIRED ARGUMENTS:"
echo
"REQUIRED ARGUMENTS:"
echo
" --ebeam Electron beam energy"
echo
" --ebeam Electron beam energy"
echo
" --pbeam Ion beam energy"
echo
" --pbeam Ion beam energy"
echo
" --minq2 Minimum momentum transfer"
echo
" --config Generator configuration identifiers (at least one)"
echo
" --config Generator configuration identifiers (at least one)"
if
[
!
-z
${
REQUIRE_MINQ2
:-}
]
;
then
echo
" --minq2 Minimum momentum transfer"
fi
if
[
!
-z
${
REQUIRE_DECAY
:-}
]
;
then
if
[
!
-z
${
REQUIRE_DECAY
:-}
]
;
then
echo
" --decay Specific decay particle (e.g. muon)."
echo
"
--decay Specific decay particle (e.g. muon)."
fi
fi
if
[
!
-z
${
REQUIRE_LEADING
:-}
]
;
then
if
[
!
-z
${
REQUIRE_LEADING
:-}
]
;
then
echo
" --leading Leading particle of interest (e.g. jpsi)."
echo
"
--leading Leading particle of interest (e.g. jpsi)."
fi
fi
echo
" -h,--help Print this message"
echo
" -h,--help Print this message"
echo
""
echo
""
...
@@ -44,8 +46,9 @@ function print_the_help {
...
@@ -44,8 +46,9 @@ function print_the_help {
EBEAM
=
EBEAM
=
PBEAM
=
PBEAM
=
MINQ2
=
MINQ2
=
DECAY
S
=
DECAY
=
CONFIG
=
CONFIG
=
LEADING
=
while
[
$#
-gt
0
]
while
[
$#
-gt
0
]
do
do
...
@@ -92,39 +95,39 @@ do
...
@@ -92,39 +95,39 @@ do
esac
esac
done
done
if
[
-z
$CONFIG
]
;
then
if
[
-z
$
{
CONFIG
:-}
]
;
then
echo
"ERROR: CONFIG not defined: --config <config>"
echo
"ERROR: CONFIG not defined: --config <config>"
print_the_help
print_the_help
exit
1
exit
1
elif
[
-z
$EBEAM
]
;
then
elif
[
-z
$
{
EBEAM
:-}
]
;
then
echo
"ERROR: EBEAM not defined: --ebeam <energy>"
echo
"ERROR: EBEAM not defined: --ebeam <energy>"
print_the_help
print_the_help
exit
1
exit
1
elif
[
-z
$PBEAM
]
;
then
elif
[
-z
$
{
PBEAM
:-}
]
;
then
echo
"ERROR: PBEAM not defined: --pbeam <energy>"
echo
"ERROR: PBEAM not defined: --pbeam <energy>"
print_the_help
print_the_help
exit
1
exit
1
elif
[
!
-z
${
REQUIRE_MINQ2
:-}
]
&&
[
-z
$MINQ2
]
;
then
elif
[
!
-z
${
REQUIRE_MINQ2
:-}
]
&&
[
-z
$
{
MINQ2
:-}
]
;
then
echo
"ERROR: MINQ2 not defined: --minq2 <energy>"
echo
"ERROR: MINQ2 not defined: --minq2 <energy>"
print_the_help
print_the_help
exit
1
exit
1
elif
[
-z
${
REQUIRE_MINQ2
:-}
]
&&
[
!
-z
$MINQ2
]
;
then
elif
[
-z
${
REQUIRE_MINQ2
:-}
]
&&
[
!
-z
$
{
MINQ2
:-}
]
;
then
echo
"ERROR: MINQ2 flag specified but not required"
echo
"ERROR: MINQ2 flag specified but not required"
print_the_help
print_the_help
exit
1
exit
1
elif
[
!
-z
${
REQUIRE_LEADING
:-}
]
&&
[
-z
$LEADING
]
;
then
elif
[
!
-z
${
REQUIRE_LEADING
:-}
]
&&
[
-z
$
{
LEADING
:-}
]
;
then
echo
"ERROR: LEADING not defined: --leading <channel>"
echo
"ERROR: LEADING not defined: --leading <channel>"
print_the_help
print_the_help
exit
1
exit
1
elif
[
-z
${
REQUIRE_LEADING
:-}
]
&&
[
!
-z
$LEADING
]
;
then
elif
[
-z
${
REQUIRE_LEADING
:-}
]
&&
[
!
-z
$
{
LEADING
:-}
]
;
then
echo
"ERROR: LEADING flag specified but not required"
echo
"ERROR: LEADING flag specified but not required"
print_the_help
print_the_help
exit
1
exit
1
elif
[
!
-z
${
REQUIRE_DECAY
:-}
]
&&
[
-z
$DECAY
]
;
then
elif
[
!
-z
${
REQUIRE_DECAY
:-}
]
&&
[
-z
$
{
DECAY
:-}
]
;
then
echo
"ERROR: DECAY not defined: --decay <channel>"
echo
"ERROR: DECAY not defined: --decay <channel>"
print_the_help
print_the_help
exit
1
exit
1
elif
[
-z
${
REQUIRE_DECAY
:-}
]
&&
[
!
-z
$DECAY
]
;
then
elif
[
-z
${
REQUIRE_DECAY
:-}
]
&&
[
!
-z
$
{
DECAY
:-}
]
;
then
echo
"ERROR: DECAY flag specified but not required"
echo
"ERROR: DECAY flag specified but not required"
print_the_help
print_the_help
exit
1
exit
1
...
...
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