#%Module1.0#####################################################################
##
## use.own.eb modulefile
##
## modulefiles/use.own.eb.  Generated by fgeorgatos
##
proc ModulesHelp { } {

        puts stderr "\tThis module file will add \$HOME/.local/easybuild/modules/all to the"
        puts stderr "\tlist of directories that the module command will search"
        puts stderr "\tfor modules.  EasyBuild places your own modulefiles here."
        puts stderr "\tThis module, when loaded, will create this directory if necessary."
        puts stderr "\n\n"
}

module-whatis   "adds your EasyBuild modulefiles directory to MODULEPATH"

eval set  [ array get env HOME ]
set     ownmoddir       $HOME/.local/easybuild/modules/all

# create directory if necessary
if [ module-info mode load ] {
        if { ! [ file exists $ownmoddir ] } {
                file mkdir $ownmoddir
        }
}

module use --prepend $ownmoddir
