i'm not so sure if this is the proper way to do it. you are going to
modify a very basic command and introduce new feature that is actually
not a part of environment-modules.
imagine what people will think when it fails; or when it works and takes
a few hours to complete. i would at the very least call the options
ebsearch and ebinstall to indicate the difference.
and the search options should take into account the results from
'available', same with install.
you could also create a new function (ebm: easybuildmodule) that does
this and just calls the module function for the regular commands.
(btw, also provide the csh version for completeness)
stijn
### what to add in your .bashrc ###
export
EBPATH=~/easybuild/easybuild/easyconfigs:~/.local/easybuild/ebfiles_repo/:~/arena/pkg2eb/outdir/
# adjust as needed
module() {
if [ "$1" = "search" ]
then
if [ -z "$2" ]
then
echo "Not enough params passed for search"
return
else
echo $EBPATH|tr : '\n'|xargs -n1 -I % find % -name '*.eb'|grep -i $2
return
fi
fi
if [ "$1" = "install" ]
then
if [ -z "$2" ]
then
echo "Not enough params passed for install"
return
else
shift
${EBHOME}/eb --robot ${CFGS} "$@"
return
fi
fi
eval `/usr/bin/modulecmd bash $*`
}