I have created env.sh file the contents of which are below
#!/bin/sh
export M2_HOME=/vagrant/tools/maven
export PATH=$PATH:$M2_HOME/bin
export JAVA_HOME=/usr/lib/jvm/jdk1.7.0_65
export ANT_HOME=/usr/local/apache-ant-1.9.7
export MAVEN_HOME=$M2_HOME
but executing this sh file does not result in env variables being exported. Have to manually execute each line to get them exported. Please help