File: siteconfig.tcl

package info (click to toggle)
modules 5.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 20,572 kB
  • sloc: exp: 46,525; sh: 5,261; tcl: 3,182; makefile: 1,355; ansic: 466; python: 251; csh: 201; perl: 47; ruby: 44
file content (29 lines) | stat: -rw-r--r-- 956 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#
# siteconfig.tcl - Site specific configuration script to override
#   'module-info' procedure to return for 'name' action file basename
#   when modulefile is specified as a full pathname
#
# Author: Xavier Delaruelle <xavier.delaruelle@cea.fr>
# Compatibility: Modules v4.2+
#
# Installation: put this file in the 'etc' directory of your Modules
#   installation. Refer to the "Modulecmd startup" section in the
#   module(1) man page to get this location.

# override 'module-info' procedure to return file basename for 'name' action
# when modulefile is specified as a full path file
rename ::module-info ::__module-info
proc module-info {what {more {}}} {
   if {$what eq {name}} {
      set name [currentModuleName]
      if {[isModuleFullPath $name]} {
         return [file tail $name]
      } else {
         return $name
      }
   } else {
      return [__module-info $what $more]
   }
}

# vim:set tabstop=3 shiftwidth=3 expandtab autoindent: