You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sc...@apache.org on 2015/12/18 20:53:45 UTC
maven git commit: [MNG-5837] "mvn" script invokes /bin/sh but
requires /bin/bash functions Submitted by: Joseph Walton
Repository: maven
Updated Branches:
refs/heads/master 5f048234f -> d980040ff
[MNG-5837] "mvn" script invokes /bin/sh but requires /bin/bash functions
Submitted by: Joseph Walton <jo...@kafsemo.org>
Use backticks instead of $(..) for the scripting added in MNG-5767.
Solaris's /bin/sh isn't POSIX-compliant enough to recognise the first
form.
'local' is not POSIX, but supported by most shells. However, it's not
supported by Solaris's /bin/sh, so use a subshell instead.
This closes #50.
Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/d980040f
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/d980040f
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/d980040f
Branch: refs/heads/master
Commit: d980040ffd4e4ad9343171140270c1725c19a6fe
Parents: 5f04823
Author: Christian Schulte <sc...@apache.org>
Authored: Fri Dec 18 20:39:26 2015 +0100
Committer: Christian Schulte <sc...@apache.org>
Committed: Fri Dec 18 20:52:42 2015 +0100
----------------------------------------------------------------------
apache-maven/src/bin/mvn | 16 ++++++++--------
apache-maven/src/bin/mvnDebug | 2 +-
apache-maven/src/bin/mvnyjp | 2 +-
3 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven/blob/d980040f/apache-maven/src/bin/mvn
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn
index 6875628..293c97a 100755
--- a/apache-maven/src/bin/mvn
+++ b/apache-maven/src/bin/mvn
@@ -197,29 +197,29 @@ fi
# traverses directory structure from process work directory to filesystem root
# first directory with .mvn subdirectory is considered project base directory
find_maven_basedir() {
- local basedir
- local wdir
- basedir="$(pwd)"
- wdir="$(pwd)"
+(
+ basedir="`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}"
+)
}
# concatenates all lines of a file
concat_lines() {
if [ -f "$1" ]; then
- echo "$(tr -s '\n' ' ' < "$1")"
+ echo "`tr -s '\n' ' ' < "$1"`"
fi
}
-MAVEN_PROJECTBASEDIR="${MAVEN_BASEDIR:-$(find_maven_basedir)}"
-MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
+MAVEN_PROJECTBASEDIR="${MAVEN_BASEDIR:-`find_maven_basedir`}"
+MAVEN_OPTS="`concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config"` $MAVEN_OPTS"
# For Cygwin, switch project base directory path to Windows format before
# executing Maven. Otherwise this will cause Maven not to consider it.
http://git-wip-us.apache.org/repos/asf/maven/blob/d980040f/apache-maven/src/bin/mvnDebug
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvnDebug b/apache-maven/src/bin/mvnDebug
index a1077ce..d5e88aa 100755
--- a/apache-maven/src/bin/mvnDebug
+++ b/apache-maven/src/bin/mvnDebug
@@ -38,4 +38,4 @@ MAVEN_DEBUG_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,addre
echo Preparing to Execute Maven in Debug Mode
-env MAVEN_OPTS="$MAVEN_OPTS" MAVEN_DEBUG_OPTS="$MAVEN_DEBUG_OPTS" $(dirname $0)/mvn "$@"
+env MAVEN_OPTS="$MAVEN_OPTS" MAVEN_DEBUG_OPTS="$MAVEN_DEBUG_OPTS" `dirname $0`/mvn "$@"
http://git-wip-us.apache.org/repos/asf/maven/blob/d980040f/apache-maven/src/bin/mvnyjp
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvnyjp b/apache-maven/src/bin/mvnyjp
index ef4f8e1..9ec6275 100755
--- a/apache-maven/src/bin/mvnyjp
+++ b/apache-maven/src/bin/mvnyjp
@@ -39,4 +39,4 @@ if [ ! -f "$YJPLIB" ]; then
exit 1
fi
-env MAVEN_OPTS="-agentpath:$YJPLIB=onexit=snapshot,onexit=memory,tracing,onlylocal $MAVEN_OPTS" $(dirname $0)/mvn "$@"
+env MAVEN_OPTS="-agentpath:$YJPLIB=onexit=snapshot,onexit=memory,tracing,onlylocal $MAVEN_OPTS" `dirname $`/mvn "$@"