Repository: maven Updated Branches: refs/heads/mng-6195 [created] e782534b0
[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/2d6db798 Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/2d6db798 Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/2d6db798 Branch: refs/heads/mng-6195 Commit: 2d6db7983dc2c5243866b1e498a5c868ae6dfb72 Parents: 33c8d8e Author: Stephen Connolly <stephen.alan.conno...@gmail.com> Authored: Sun Mar 26 22:41:24 2017 +0100 Committer: Stephen Connolly <stephen.alan.conno...@gmail.com> Committed: Mon Mar 27 16:22:47 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/2d6db798/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