Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Pmodules
buildblocks
Commits
3193331a
Commit
3193331a
authored
Jul 15, 2015
by
gsell
Browse files
scripts/Bootstrap/Pmodules/modulecmd.bash.in:
- cleanup
parent
840ae5d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
23 deletions
+12
-23
scripts/Bootstrap/Pmodules/modulecmd.bash.in
scripts/Bootstrap/Pmodules/modulecmd.bash.in
+12
-23
No files found.
scripts/Bootstrap/Pmodules/modulecmd.bash.in
View file @
3193331a
...
...
@@ -5,7 +5,7 @@
# we have to unset CDPATH, otherwise 'cd' prints the directoy!
unset
CDPATH
# used
insid
e output
text
only
# used
for som
e output only
declare
-r
CMD
=
'module'
declare
-r
mydir
=
$(
cd
$(
dirname
"
$0
"
)
&&
pwd
)
...
...
@@ -16,6 +16,8 @@ declare -r libexecdir="${prefix}/libexec"
source
"
${
libdir
}
/libpmodules.bash"
PATH
=
"
${
bindir
}
:
${
PATH
}
"
declare
-r
version
=
'@PMODULES_VERSION@'
declare
-r
modulecmd
=
"
${
libexecdir
}
/modulecmd.tcl"
...
...
@@ -1586,7 +1588,6 @@ case $1 in
esac
shift
declare
-a
sargs
=()
declare
-a
opts
=()
while
((
$#
>
0
))
;
do
case
$1
in
...
...
@@ -1597,63 +1598,51 @@ while (( $# > 0 )); do
print_version
die 1
;;
-f
|
--force
|
-s
|
--silent
|
-v
|
--verbose
|
-w
|
--warn
)
opts+
=(
"
$1
"
)
;;
-t
|
--terse
|
-l
|
--long
|
-h
|
--human
)
opts+
=(
$1
)
;;
-a
|
--appent
|
-p
|
--prepend
)
opts+
=(
"
$1
"
)
;;
--debug
)
set
-x
;;
-
*
)
die 1
"
$1
: unknown switch."
opts+
=(
"
$1
"
)
;;
add|load
)
subcommand
=
'subcommand_load'
shift
sargs
=(
"
$@
"
)
opts+
=(
"
$@
"
)
shift
$#
;;
rm
|
unload
)
subcommand
=
'subcommand_unload'
shift
sargs
=(
"
$@
"
)
opts+
=(
"
$@
"
)
shift
$#
;;
switch|swap
)
subcommand
=
'subcommand_swap'
shift
sargs
=(
"
$@
"
)
opts+
=(
"
$@
"
)
shift
$#
;;
display|show
)
subcommand
=
'subcommand_show'
shift
sargs
=(
"
$@
"
)
opts+
=(
"
$@
"
)
shift
$#
;;
apropos|keyword
)
subcommand
=
'subcommand_apropos'
shift
sargs
=(
"
$@
"
)
opts+
=(
"
$@
"
)
shift
$#
;;
avail|search|use|unuse|update|refresh|purge|list|clear|whatis|help
)
subcommand
=
subcommand_
$1
shift
if
((
$#
>
0
))
;
then
sargs
=(
"
$@
"
)
opts+
=(
"
$@
"
)
shift
$#
fi
;;
initadd|initprepend|initrm|initswitch|initlist|initclear
)
subcommand
=
subcommand_
$1
shift
sarg
s
=(
"
$@
"
)
opt
s
=(
"
$@
"
)
shift
$#
;;
*
)
...
...
@@ -1668,7 +1657,7 @@ if (( ${#Groups[@]} == 0 )); then
get_hierarchy_depth
"
${
PMODULES_ROOT
}
"
fi
$subcommand
"
${
sargs
[@]
}
"
"
${
opts
[@]
}
"
$subcommand
"
${
opts
[@]
}
"
# Local Variables:
# mode: sh
...
...
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