#!/usr/bin/env rc

#LMOD_ROOT='/usr/share/lmod'
LMOD_PKG='/usr/share/lmod/lmod'
LMOD_DIR='/usr/share/lmod/lmod/libexec'
LMOD_CMD='/usr/share/lmod/lmod/libexec/lmod'
MODULESHOME='/usr/share/lmod/lmod'

fn module {
  eval `{$LMOD_CMD rc $*}
}

fn clearMT {
  eval `{$LMOD_DIR/clearMT_cmd rc}
}

########################################################################
#  ml is a shorthand tool for people who can't type moduel, err, module
#  It is also a combination command:
#     ml            -> module list
#     ml gcc        -> module load gcc
#     ml -gcc intel -> module unload gcc; module load intel
#  It does much more do: "ml --help" for more information.
fn ml {
  eval `{$LMOD_DIR/ml_cmd $*}
}

# Local Variables:
# mode: shell-script
# indent-tabs-mode: nil
# End:
