summaryrefslogtreecommitdiff
path: root/templates/modules/modulefile.dk
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2018-01-17 14:14:45 -0800
committerTodd Gamblin <tgamblin@llnl.gov>2018-01-17 14:14:45 -0800
commitc2a10a2aa23f3905ee22bb4b7c79ab963d966a9d (patch)
tree18d502edbbc09b8f9cf255697bd135e9718fb584 /templates/modules/modulefile.dk
parent52a9e5d2a31b4a66ce51d0ff03ab709417dee6dc (diff)
parentba6c39310b537bbeafd4eb00836623ac2bb19d99 (diff)
downloadspack-0.11.0.tar.gz
spack-0.11.0.tar.bz2
spack-0.11.0.tar.xz
spack-0.11.0.zip
Merge branch 'releases/v0.11.0'v0.11.0
Diffstat (limited to 'templates/modules/modulefile.dk')
-rw-r--r--templates/modules/modulefile.dk31
1 files changed, 31 insertions, 0 deletions
diff --git a/templates/modules/modulefile.dk b/templates/modules/modulefile.dk
new file mode 100644
index 0000000000..c3f6d2dce1
--- /dev/null
+++ b/templates/modules/modulefile.dk
@@ -0,0 +1,31 @@
+{% block header %}
+{% if category %}
+#c {{ category }}
+{% endif %}
+{% if short_description %}
+#d {{ short_description }}
+{% endif %}
+{% if long_description %}
+{{ long_description| textwrap(72)| prepend_to_line('#h ')| join() }}
+{% endif %}
+{% endblock %}
+
+{% block autoloads %}
+{% for module in autoload %}
+dk_op {{ module }}
+{% endfor %}
+{% endblock %}
+
+{% block environment %}
+{% for command_name, cmd in environment_modifications %}
+{% if command_name == 'PrependPath' %}
+dk_alter {{ cmd.name }} {{ cmd.value }}
+{% endif %}
+{% if command_name == 'RemovePath' %}
+dk_unalter {{ cmd.name }} {{ cmd.value }}
+{% endif %}
+{% if command_name == 'SetEnv' %}
+dk_setenv {{ cmd.name }} {{ cmd.value }}
+{% endif %}
+{% endfor %}
+{% endblock %}