You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by if...@apache.org on 2015/01/27 21:22:11 UTC

[2/2] maven git commit: shell script fixes

shell script fixes

Signed-off-by: Igor Fedorenko <if...@apache.org>


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

Branch: refs/heads/project-basedir
Commit: fd6f4791144521732552e2283a9655983516633b
Parents: 0a76e91
Author: Igor Fedorenko <if...@apache.org>
Authored: Tue Jan 27 15:22:06 2015 -0500
Committer: Igor Fedorenko <if...@apache.org>
Committed: Tue Jan 27 15:22:06 2015 -0500

----------------------------------------------------------------------
 apache-maven/src/bin/mvn           | 2 +-
 apache-maven/src/bin/mvn-common.sh | 6 ++++--
 apache-maven/src/bin/mvnDebug      | 2 +-
 apache-maven/src/bin/mvnyjp        | 2 +-
 4 files changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/fd6f4791/apache-maven/src/bin/mvn
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn
index cec2baa..f745f4e 100755
--- a/apache-maven/src/bin/mvn
+++ b/apache-maven/src/bin/mvn
@@ -191,7 +191,7 @@ fi
 
 . "$M2_HOME/bin/mvn-common.sh"
 export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-$(find_maven_basedir)}
-MAVEN_OPTS=$(concat "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
 
 # Provide a "standardized" way to retrieve the CLI args that will 
 # work with both Windows and non-Windows executions.

http://git-wip-us.apache.org/repos/asf/maven/blob/fd6f4791/apache-maven/src/bin/mvn-common.sh
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvn-common.sh b/apache-maven/src/bin/mvn-common.sh
index 5fd090e..b39741b 100755
--- a/apache-maven/src/bin/mvn-common.sh
+++ b/apache-maven/src/bin/mvn-common.sh
@@ -36,6 +36,8 @@ find_maven_basedir() {
 }
 
 # concatenates all lines of a file
-concat() {
-  echo "$(tr -s '\n' ' ' < $1)"
+concat_lines() {
+  if [ -f "$1" ]; then
+    echo "$(tr -s '\n' ' ' < "$1")"
+  fi
 }

http://git-wip-us.apache.org/repos/asf/maven/blob/fd6f4791/apache-maven/src/bin/mvnDebug
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvnDebug b/apache-maven/src/bin/mvnDebug
index d3fa982..287d20b 100755
--- a/apache-maven/src/bin/mvnDebug
+++ b/apache-maven/src/bin/mvnDebug
@@ -195,7 +195,7 @@ fi
 
 . "$M2_HOME/bin/mvn-common.sh"
 export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-$(find_maven_basedir)}
-MAVEN_OPTS=$(concat "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
 
 # Provide a "standardized" way to retrieve the CLI args that will 
 # work with both Windows and non-Windows executions.

http://git-wip-us.apache.org/repos/asf/maven/blob/fd6f4791/apache-maven/src/bin/mvnyjp
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvnyjp b/apache-maven/src/bin/mvnyjp
index b78eeab..6d5f555 100755
--- a/apache-maven/src/bin/mvnyjp
+++ b/apache-maven/src/bin/mvnyjp
@@ -198,7 +198,7 @@ MAVEN_OPTS="-agentpath:$YJPLIB=onexit=snapshot,onexit=memory,tracing,onlylocal $
 
 . "$M2_HOME/bin/mvn-common.sh"
 export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-$(find_maven_basedir)}
-MAVEN_OPTS=$(concat "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
 
 # Provide a "standardized" way to retrieve the CLI args that will 
 # work with both Windows and non-Windows executions.