#%Module1.0#####################################################################
##
## use.own modulefile
##
## modulefiles/use.own.  Generated from use.own.in by configure.
##
proc ModulesHelp { } {
	global rkoversion

	puts stderr "\tThis module file will add \$HOME/privatemodules to the"
	puts stderr "\tlist of directories that the module command will search"
	puts stderr "\tfor modules.  Place your own module files here."
	puts stderr "\tThis module, when loaded, will create this directory"
	puts stderr "\tif necessary."
	puts stderr "\n\tVersion $rkoversion\n"
}

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

# for Tcl script use only
set	rkoversion	3.2.10

eval set  [ array get env HOME ]
set	ownmoddir	$HOME/privatemodules

# create directory if necessary
if [ module-info mode load ] {
	if { ! [ file exists $ownmoddir ] } {
		file mkdir $ownmoddir
		set null [open $ownmoddir/null w]
	puts $null "#%Module########################################################################"
	puts $null "##"
	puts $null "## null modulefile"
	puts $null "##"
	puts $null "proc ModulesHelp { } {"
	puts $null "        global version"
	puts $null ""
	puts $null "        puts stderr \"\tThis module does absolutely nothing.\""
	puts $null "        puts stderr \"\tIt's meant simply as a place holder in your\""
	puts $null "	puts stderr \"\tdot file initialization.\""
	puts $null "        puts stderr \"\n\tVersion \$version\n\""
	puts $null "}"
	puts $null ""
	puts $null "module-whatis	\"does absolutely nothing\""
	puts $null ""
	puts $null "# for Tcl script use only"
	puts $null "set     version      3.2.10"
	}
}

module use --append $ownmoddir

