[MNG-5829] mvn shell script fails with syntax error on Solaris 10 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.
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/1d9708a9 Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/1d9708a9 Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/1d9708a9 Branch: refs/heads/MNG-5359-IT Commit: 1d9708a954e2d764f6ba933c4e9ba117afa9b4c4 Parents: 8c7ce55 Author: Joseph Walton <j...@kafsemo.org> Authored: Mon Jan 30 11:01:49 2017 +0100 Committer: Michael Osipov <micha...@apache.org> Committed: Mon Jan 30 12:56:36 2017 +0100 ---------------------------------------------------------------------- apache-maven/src/bin/mvn | 12 ++++++------ apache-maven/src/bin/mvnDebug | 2 +- apache-maven/src/bin/mvnyjp | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/maven/blob/1d9708a9/apache-maven/src/bin/mvn ---------------------------------------------------------------------- diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn index 3a4dc26..4a7f610 100755 --- a/apache-maven/src/bin/mvn +++ b/apache-maven/src/bin/mvn @@ -192,14 +192,14 @@ fi 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}" } @@ -207,12 +207,12 @@ find_maven_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/1d9708a9/apache-maven/src/bin/mvnDebug ---------------------------------------------------------------------- diff --git a/apache-maven/src/bin/mvnDebug b/apache-maven/src/bin/mvnDebug index 8d6e6a1..be495ff 100755 --- a/apache-maven/src/bin/mvnDebug +++ b/apache-maven/src/bin/mvnDebug @@ -31,4 +31,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/1d9708a9/apache-maven/src/bin/mvnyjp ---------------------------------------------------------------------- diff --git a/apache-maven/src/bin/mvnyjp b/apache-maven/src/bin/mvnyjp index b2dbe1d..a35eabf 100755 --- a/apache-maven/src/bin/mvnyjp +++ b/apache-maven/src/bin/mvnyjp @@ -32,4 +32,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 "$0"`/mvn" "$@"