summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2017-05-29 14:58:30 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2017-05-29 14:58:30 +0100
commite6092a1dd8421614414cc8bdc337540a440ddd4b (patch)
treeb3ebe54550f94620769e2b96be2847a0637abcf5
parentUse functions instead of aliases for vcs diffs (diff)
downloadutil-e6092a1dd8421614414cc8bdc337540a440ddd4b.tar.bz2
util-e6092a1dd8421614414cc8bdc337540a440ddd4b.tar.xz
util-e6092a1dd8421614414cc8bdc337540a440ddd4b.zip
Find maven home based on installed mavens
-rw-r--r--bashrc4
1 files changed, 3 insertions, 1 deletions
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"