summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Davydov <davydden@gmail.com>2016-04-22 04:26:19 +0200
committerTodd Gamblin <tgamblin@llnl.gov>2016-04-21 19:26:19 -0700
commita0989ad672bd22afe89ee2c2f50b32003ebb2764 (patch)
tree311b2371ca7d6df8992baddffdc109079fd626e0
parentef9347bcfb52e7f80aacb4ecb63d1536b8aaa3c0 (diff)
downloadspack-a0989ad672bd22afe89ee2c2f50b32003ebb2764.tar.gz
spack-a0989ad672bd22afe89ee2c2f50b32003ebb2764.tar.bz2
spack-a0989ad672bd22afe89ee2c2f50b32003ebb2764.tar.xz
spack-a0989ad672bd22afe89ee2c2f50b32003ebb2764.zip
minor cleanup of environment-modules documentation (#814)
* minor cleanup of environment-modules documentation * environment modules: update usage instructions
-rw-r--r--lib/spack/docs/basic_usage.rst17
1 files changed, 11 insertions, 6 deletions
diff --git a/lib/spack/docs/basic_usage.rst b/lib/spack/docs/basic_usage.rst
index 68f3d07b29..0e603813e1 100644
--- a/lib/spack/docs/basic_usage.rst
+++ b/lib/spack/docs/basic_usage.rst
@@ -807,17 +807,22 @@ Environment Modules, you can get it with Spack:
1. Install with::
+.. code-block:: sh
+
spack install environment-modules
2. Activate with::
- MODULES_HOME=`spack location -i environment-modules`
- MODULES_VERSION=`ls -1 $MODULES_HOME/Modules | head -1`
- ${MODULES_HOME}/Modules/${MODULES_VERSION}/bin/add.modules
+Add the following two lines to your ``.bashrc`` profile (or similar):
+
+.. code-block:: sh
+
+ MODULES_HOME=`spack location -i environment-modules`
+ source ${MODULES_HOME}/Modules/init/bash
+
+In case you use a Unix shell other than bash, substitute ``bash`` by
+the appropriate file in ``${MODULES_HOME}/Modules/init/``.
-This adds to your ``.bashrc`` (or similar) files, enabling Environment
-Modules when you log in. It will ask your permission before changing
-any files.
Spack and Environment Modules
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~