Repository: maven
Updated Branches:
  refs/heads/project-basedir 4b32ef2cb -> 66ad0a4a5


cleaned up some bash-isms

Signed-off-by: Igor Fedorenko <[email protected]>


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

Branch: refs/heads/project-basedir
Commit: 66ad0a4a5e0a4b1292a9e3f3dad35209f8b6b4c9
Parents: 4b32ef2
Author: Igor Fedorenko <[email protected]>
Authored: Mon Jan 26 19:19:06 2015 -0500
Committer: Igor Fedorenko <[email protected]>
Committed: Mon Jan 26 19:19:06 2015 -0500

----------------------------------------------------------------------
 apache-maven/src/bin/.gitattributes |  1 +
 apache-maven/src/bin/mvn-common.sh  | 17 +++++------------
 2 files changed, 6 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/66ad0a4a/apache-maven/src/bin/.gitattributes
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/.gitattributes 
b/apache-maven/src/bin/.gitattributes
index cc7533f..90eeece 100644
--- a/apache-maven/src/bin/.gitattributes
+++ b/apache-maven/src/bin/.gitattributes
@@ -1,3 +1,4 @@
 mvn                eol=lf crlf=input
 mvnDebug           eol=lf crlf=input
 mvnyjp             eol=lf crlf=input
+mvn-common.sh      eol=lf crlf=input

http://git-wip-us.apache.org/repos/asf/maven/blob/66ad0a4a/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 adac638..5fd090e 100755
--- a/apache-maven/src/bin/mvn-common.sh
+++ b/apache-maven/src/bin/mvn-common.sh
@@ -22,12 +22,12 @@
 
 # traverses directory structure from process work directory to filesystem root
 # first directory with .mvn subdirectory is considered project base directory
-function find_maven_basedir {
+find_maven_basedir() {
   local basedir=$(pwd)
   local wdir=$(pwd)
-  while [ "$wdir" != '/' ]; do
+  while [ "$wdir" != '/' ] ; do
     wdir=$(cd $wdir/..; pwd)
-    if [[ -d "$wdir"/.mvn ]]; then
+    if [ -d "$wdir"/.mvn ] ; then
       basedir=$wdir
       break
     fi
@@ -36,13 +36,6 @@ function find_maven_basedir {
 }
 
 # concatenates all lines of a file
-function concat {
-  local file=$1
-  local result=
-  if [ -f "$file" ]; then
-    while read -r line; do
-      result="$result $line"
-    done < "$file"
-  fi
-  echo "$result"
+concat() {
+  echo "$(tr -s '\n' ' ' < $1)"
 }

Reply via email to