Debian Codegraph @

doc/example/tips-for-code-reuse/fooB/common

raw
1 #Common modulefile for fooB
2 #Expects the following variables to have been set
3 # version: the version of fooB, defaults to last component of module tag
4
5 if {![info exists version]} {
6 set version [file tail [module-info version [module-info name] ] ]
7 }
8
9 proc ModulesHelp { } {
10 global version
11 puts stderr "
12 FooB: A simple example of modulefile code reuse, revisited
13 Version $version
14
15 This our second visit to simple example of code reuse in modulefiles.
16 Because the all of the differences between the different fooB versions
17 modulefiles is contained in the version number, we replace the stub
18 modulefiles for the two versions with symlinks to a generic version
19 file, and infer the version from the tag given to the module command.
20
21 The generic modulefile, .generic, does not appear in 'module avail'
22 commands because of the leading period (.). Indeed, this generic modulefile
23 does is not even 'bar' specific, and typically we actually put the file
24 in an utilities directory outside the MODULEPATH and symlink to it from
25 multiple packages.
26
27 "
28 }
29 module-whatis "fooB version $version"
30
31 conflict fooB
32 set rootdir /software/fooB/$version
33 prepend-path PATH $rootdir/bin
34 prepend-path MANPATH $rootdir/share/man
35 prepend-path LD_LIBRARY_PATH $rootdir/lib