Skip to content

Instantly share code, notes, and snippets.

@pescobar
Created July 9, 2014 11:44
Show Gist options
  • Save pescobar/451a49b954326d6163f2 to your computer and use it in GitHub Desktop.
Save pescobar/451a49b954326d6163f2 to your computer and use it in GitHub Desktop.
/etc/profile.d/lmod.sh
shell=`/bin/basename $SHELL`
#shell=`/bin/basename \`/bin/ps -p $$ -ocomm=\``
if [ -f /opt/soft/apps/lmod/lmod/init/$shell ]
then
export PATH=/opt/soft/apps/lua/5.1.4.5/bin:/opt/soft/apps/lmod/lmod/libexec:$PATH
. /opt/soft/apps/lmod/lmod/init/$shell
export MODULEPATH='/opt/Modules/modulesfiles'
for dir in `ls -1 /opt/soft/modules/| egrep -v '^all$' `
do
export MODULEPATH="$MODULEPATH:/opt/soft/modules/$dir"
done
export -f module
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment