Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
S
src
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
10
Issues
10
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Code Review
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Pmodules
src
Commits
ccb02fdf
Commit
ccb02fdf
authored
Sep 03, 2020
by
gsell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modulecmd.bash.in: implement use-flags with arrays
parent
800f4b76
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
Pmodules/modulecmd.bash.in
Pmodules/modulecmd.bash.in
+11
-5
No files found.
Pmodules/modulecmd.bash.in
View file @
ccb02fdf
...
...
@@ -463,15 +463,21 @@ subcommand_load() {
fi
fi
local
found
=
''
for
flag
in
"
${
UseFlags
[@]/#/_
}
"
"
"
;
do
# :FIXME: this doesn't work if ${m} is a
# modulename without version
if
is_available
"
${
m
}${
flag
}
"
;
then
m+
=
"
${
flag
}
"
for
flag
in
"
${
!UseFlags[@]
}
"
;
do
# :FIXME: this doesn't work if ${m} is a
# modulename without version
if
is_available
"
${
m
}
_
${
flag
}
"
;
then
m+
=
"
_
${
flag
}
"
found
=
':'
break
fi
done
if
[[
!
"
${
found
}
"
]]
;
then
# no use-flags set
if
is_available
"
${
m
}
"
;
then
found
=
':'
fi
fi
if
[[
!
"
${
found
}
"
]]
;
then
std::info
"%s %s: module unavailable -- %s
\n
"
\
"
${
CMD
}
"
'load'
"
${
m
}
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment