From e6092a1dd8421614414cc8bdc337540a440ddd4b Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 29 May 2017 14:58:30 +0100 Subject: Find maven home based on installed mavens --- bashrc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bashrc b/bashrc index 8560037..1116104 100644 --- a/bashrc +++ b/bashrc @@ -73,7 +73,9 @@ hgd() { # Java PATH=$JAVA_HOME/bin:$PATH export CATALINA_HOME="/usr/share/tomcat-5.5/" -export M2_HOME="/usr/share/maven-bin-3.0" +if [ -d /usr/share/maven-bin-* ] ; then + export M2_HOME=$(ls -d /usr/share/maven-bin-*) +fi export NPM_PACKAGES="${HOME}/.npm-packages" export NODE_PATH="$NPM_PACKAGES/lib64/node_modules:$NODE_PATH" export MANPATH="$(manpath):$NPM_PACKAGES/share/man" -- cgit v1.2.3