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
e5503c54
Commit
e5503c54
authored
Jul 10, 2015
by
gsell
Browse files
scripts/Bootstrap/Pmodules/{ennvironment,profile}.bash:
- cleanup
parent
9b1f2622
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
19 deletions
+23
-19
scripts/Bootstrap/Pmodules/environment.bash.in
scripts/Bootstrap/Pmodules/environment.bash.in
+17
-17
scripts/Bootstrap/Pmodules/profile.bash
scripts/Bootstrap/Pmodules/profile.bash
+6
-2
No files found.
scripts/Bootstrap/Pmodules/environment.bash.in
View file @
e5503c54
#!/bin/bash
#
# Notes:
# - PMODULES_ROOT is derived from the location of this file.
# - Some for PMODULES_CONFIG_DIR.
# - The Pmodules software must be installed in
# ${PMODULES_ROOT}/Tools/Pmodules/${PMODULES_VERSION}
#
declare
-x
PMODULES_ROOT
=
$(
cd
$(
dirname
"
${
BASH_SOURCE
}
"
)
/..
&&
pwd
)
if
[[
-z
${
PMODULES_VERSION
}
]]
;
then
declare
-x
PMODULES_VERSION
=
"@PMODULES_VERSION@"
fi
declare
-x
PMODULES_HOME
=
"
${
PMODULES_ROOT
}
/Tools/Pmodules/
${
PMODULES_VERSION
}
"
declare
-x
PMODULES_DIR
=
"
${
PMODULES_HOME
}
"
declare
-x
PMODULES_CONFIG_DIR
=
$(
basename
$(
cd
$(
dirname
"
${
BASH_SOURCE
}
"
)
&&
pwd
))
declare
-x
PMODULES_MODULEFILES_DIR
=
'modulefiles'
declare
-x
PMODULES_TEMPLATES_DIR
=
'templates'
...
...
@@ -16,12 +14,14 @@ declare -x PMODULES_DEFAULT_GROUPS='Tools Programming'
declare
-x
PMODULES_DEFINED_RELEASES
=
':unstable:stable:deprecated:'
declare
-x
PMODULES_DEFAULT_RELEASES
=
'stable'
# legacy vars
declare
-x
PSI_PREFIX
=
"
${
PMODULES_ROOT
}
"
declare
-x
PSI_CONFIG_DIR
=
"
${
PMODULES_CONFIG_DIR
}
"
declare
-x
PSI_MODULES_ROOT
=
"
${
PMODULES_MODULES_ROOT
}
"
declare
-x
PSI_TEMPLATES_DIR
=
"
${
PMODULES_TEMPLATES_DIR
}
"
declare
-x
PSI_DEFAULT_FAMILIES
=
"
${
PMODULES_DEFAULT_GROUPS
}
"
declare
-x
PSI_DEFAULT_RELEASES
=
"
${
PMODULES_DEFAULT_RELEASES
}
"
declare
-x
PSI_DEFINED_RELEASES
=
"
${
PMODULES_DEFINED_RELEASES
}
"
if
[[
-z
${
PMODULES_VERSION
}
]]
;
then
declare
-x
PMODULES_VERSION
=
"@PMODULES_VERSION@"
fi
#
# DO NOT CHANGE THE FOLLOWING LINES!
declare
-x
PMODULES_ROOT
=
$(
cd
$(
dirname
"
${
BASH_SOURCE
}
"
)
/..
&&
pwd
)
declare
-x
PMODULES_CONFIG_DIR
=
$(
basename
$(
cd
$(
dirname
"
${
BASH_SOURCE
}
"
)
&&
pwd
))
declare
-x
PMODULES_HOME
=
"
${
PMODULES_ROOT
}
/Tools/Pmodules/
${
PMODULES_VERSION
}
"
declare
-x
PMODULES_DIR
=
"
${
PMODULES_HOME
}
"
scripts/Bootstrap/Pmodules/profile.bash
View file @
e5503c54
#!/bin/bash
#
#############################################################################
# D O N O T C H A N G E T H I S F I L E ! #
#############################################################################
#############################################################################
# read Pmodules configuration
...
...
@@ -27,8 +31,8 @@ if [[ -z ${PMODULES_VERSION} ]]; then
echo
"Oops:
${
PMODULES_VERSION
}
: Pmodules version not set."
1>&2
return
1
fi
if
[[
-z
${
PMODULES_HOME
}
]]
;
then
echo
"Oops:
${
PMODULES_HOME
}
:
Pmodules home not set."
1>&2
if
[[
-z
${
PMODULES_HOME
}
]]
;
then
echo
"Oops: Pmodules home not set."
1>&2
return
1
fi
if
[[
!
-d
${
PMODULES_HOME
}
]]
;
then
...
...
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