source: trunk/dports/java/maven/files/patch-maven @ 21485

Last change on this file since 21485 was 21485, checked in by eridius@…, 13 years ago

Massive update to svn properties on files:
All patchfiles have svn:eol-style removed.
All files that are not in fact able to be executed have svn:executable removed
All binary files have svn:eol-style removed (and are probably corrupt)
All binary files have svn:mime-type set to application/octet-stream
All files which are not patchfiles or binary files have svn:eol-style set to native
All Portfiles have svn:eol-style set to native and svn:executable removed

File size: 1.4 KB
Line 
1--- bin/maven   2004-12-07 03:13:46.000000000 -0800
2+++ bin/maven.new       2004-12-09 11:56:39.000000000 -0800
3@@ -49,38 +49,30 @@
4            ;;
5 esac
6 
7-if [ -z "$MAVEN_HOME" ] ; then
8-  # try to find MAVEN
9-  if [ -d /opt/maven ] ; then
10-    MAVEN_HOME=/opt/maven
11-  fi
12-
13-  if [ -d "$HOME/maven" ] ; then
14-    MAVEN_HOME="$HOME/maven"
15-  fi
16+# try to find MAVEN in well known locations
17+[ -z "$MAVEN_HOME" -a -d /opt/maven ]          && MAVEN_HOME=/opt/maven
18+[ -z "$MAVEN_HOME" -a -d "$HOME/maven" ]       && MAVEN_HOME="$HOME/maven"
19 
20+# Otherwise try to determine it from our invocation path
21+if [ -z "$MAVEN_HOME" ] ; then
22   ## resolve links - $0 may be a link to maven's home
23-  PRG=$0
24   saveddir=`pwd`
25 
26   # need this for relative symlinks
27-  PRGDIR=`dirname "$PRG"`
28-  cd "$PRGDIR"
29-
30-  while [ -h "$PRG" ] ; do
31-    ls=`ls -ld "$PRG"`
32-    link=`expr "$ls" : '.*-> \(.*\)$'`
33-    if expr "$link" : '.*/.*' > /dev/null; then
34-  PRG="$link"
35-    else
36-  PRG="$PRGDIR/$link"
37-    fi
38+  PRG="$0"   
39+  while [ -h "$PRG" ]; do
40+      ls=`ls -ld "$PRG"`
41+      link=`expr "$ls" : '.*-> \(.*\)$'`
42+      if expr "$link" : '/.*' > /dev/null; then
43+          PRG="$link"
44+      else
45+          PRG="`dirname $PRG`/$link"
46+      fi
47   done
48-
49-  MAVEN_HOME="$PRGDIR/.."
50-
51-  # make it fully qualified
52-  MAVEN_HOME=`cd "$MAVEN_HOME" && pwd`
53+   
54+  # Make it fully specified
55+  cd "`dirname \"$PRG\"`/.."
56+  MAVEN_HOME="`pwd -P`"
57 
58   cd "$saveddir"
59 fi
Note: See TracBrowser for help on using the repository browser.