You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2017/04/01 22:21:55 UTC
[27/28] 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/a14237d0
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/a14237d0
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/a14237d0
Branch: refs/heads/MNG-6169
Commit: a14237d07e4b1ff8d89b983f6ba74276b354dc2c
Parents: 9aabe2a
Author: Stephen Connolly <st...@gmail.com>
Authored: Sun Mar 26 22:41:24 2017 +0100
Committer: Michael Osipov <mi...@apache.org>
Committed: Sun Apr 2 00:21:12 2017 +0200
----------------------------------------------------------------------
apache-maven/src/bin/mvn | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven/blob/a14237d0/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