osx is putting init files someplace else
set -x -e
+export INIT=''
if [ "$(uname)" == "Darwin" ]; then
export INSTALL_ROOT=${PREFIX}
@@ -9,15 +10,15 @@ if [ "$(uname)" == "Darwin" ]; then
make prefix=$PREFIX
make prefix=$PREFIX install
- source $PREFIX/Modules/3.2.10/init/bash
- module --help
+ INIT=${PREFIX}/init/bash
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
./configure --prefix=$PREFIX --with-tcl=$PREFIX/lib
make
make install
+ INIT=${PREFIX}/Modules/3.2.10/init/bash
fi
mkdir -p $PREFIX/etc/conda/activate.d/
-echo "source $PREFIX/Modules/3.2.10/init/bash" >> $PREFIX/etc/conda/activate.d/environment-modules-activate.sh
+echo "source $INIT" >> $PREFIX/etc/conda/activate.d/environment-modules-activate.sh
chmod a+x $PREFIX/etc/conda/activate.d/environment-modules-activate.sh
