--------------------------------------------------------------

Issue: MNG-1470
     URL: http://jira.codehaus.org/browse/MNG-1470
 Summary: mvn can't calculate M2_HOME when mvn is a relative symlink
Reporter: Nicolás Lichtmaier (niqueco)
--------------------------------------------------------------

o patch applied
 


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@345559 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2005-11-18 20:12:21 +00:00
parent 4350da7547
commit 02902d53a2

View File

@ -60,7 +60,7 @@ if [ -z "$M2_HOME" ] ; then
while [ -h "$PRG" ] ; do while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"` ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'` link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '.*/.*' > /dev/null; then if expr "$link" : '/.*' > /dev/null; then
PRG="$link" PRG="$link"
else else
PRG="`dirname "$PRG"`/$link" PRG="`dirname "$PRG"`/$link"