You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kh...@apache.org on 2017/05/01 14:43:35 UTC

[17/27] maven git commit: [MNG-6195] Tidy up quoting and command substitution

[MNG-6195] Tidy up quoting and command substitution


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/96543b7c
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/96543b7c
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/96543b7c

Branch: refs/heads/MNG-6069
Commit: 96543b7c6ea52ad7ba3bcd559c38b159f8aa4c0d
Parents: 00c82b7
Author: Stephen Connolly <st...@gmail.com>
Authored: Sun Mar 26 22:41:24 2017 +0100
Committer: Stephen Connolly <st...@gmail.com>
Committed: Sat Apr 1 11:29:09 2017 +0100

----------------------------------------------------------------------
 apache-maven/src/bin/mvn | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/96543b7c/apache-maven/src/bin/mvn
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn
index df62f68..e569633 100755
--- a/apache-maven/src/bin/mvn
+++ b/apache-maven/src/bin/mvn
@@ -83,14 +83,14 @@ fi
 # For MinGW, ensure paths are in Unix format before anything is touched
 if $mingw ; then
   [ -n "$MAVEN_HOME" ] &&
-    MAVEN_HOME="`(cd "$MAVEN_HOME"; pwd)`"
+    MAVEN_HOME=`(cd "$MAVEN_HOME"; pwd)`
   [ -n "$JAVA_HOME" ] &&
-    JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+    JAVA_HOME=`(cd "$JAVA_HOME"; pwd)`
   # TODO classpath?
 fi
 
 if [ -z "$JAVA_HOME" ] ; then
-  JAVACMD="`which java`"
+  JAVACMD=`which java`
 else
   JAVACMD="$JAVA_HOME/bin/java"
 fi
@@ -122,13 +122,13 @@ fi
 find_maven_basedir() {
 (
   basedir=`find_file_argument_basedir "$@"`
-  wdir="`pwd`"
+  wdir=`pwd`
   while [ "$wdir" != '/' ] ; do
     if [ -d "$wdir"/.mvn ] ; then
       basedir=$wdir
       break
     fi
-    wdir="`cd "$wdir/.."; pwd`"
+    wdir=`cd "$wdir/.."; pwd`
   done
   echo "${basedir}"
 )
@@ -136,13 +136,14 @@ find_maven_basedir() {
 
 find_file_argument_basedir() {
 (
-  basedir="`pwd`"
+  basedir=`pwd`
 
   found_file_switch=0
   for arg in "$@"; do
     if [ ${found_file_switch} -eq 1 ]; then
       if [ -f "${arg}" ]; then
-        basedir=$(dirname "$(readlink -f "${arg}")")
+        basedir=`dirname "${arg}"`
+        basedir=`cd "${basedir}" && pwd -P`
         if [ ! -d "${basedir}" ]; then
           echo "Directory ${basedir} extracted from the -f/--file command-line argument ${arg} does not exist" >&2
           exit 1