This is an automated email from the ASF dual-hosted git repository.

myrle pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-demo-server.git

commit 38683ab6c559f44b829699bcee4b85f28aa79966
Author: Simon Matthews <si...@dreamstartlabs.com>
AuthorDate: Mon Oct 16 21:31:54 2017 -0700

    fixed the use of tail, added more info
---
 scripts/Unix/initial-setup.sh | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

diff --git a/scripts/Unix/initial-setup.sh b/scripts/Unix/initial-setup.sh
index eddd89f..1d4dfc1 100755
--- a/scripts/Unix/initial-setup.sh
+++ b/scripts/Unix/initial-setup.sh
@@ -6,6 +6,7 @@ exec 5>&1
 mkdir -p core
 cd core
 ERRORS=""
+FAILEDMODULES=""
 get_modules() {
   for module in $@
   do
@@ -15,10 +16,11 @@ get_modules() {
     # For some reason permission is denied
     chmod +x gradlew
     THISBUILD="\nBUILDING $module\n"
-    THISBUILD+=$(./gradlew publishToMavenLocal |& tee >(tail >&5) 
+    THISBUILD+=$(./gradlew publishToMavenLocal |& tee >(cat - >&5) 
        if [ ${PIPESTATUS[0]} -ne 0 ]; then exit 1; fi )
     if [ $? -ne 0 ]; then 
-        ERRORS+="$THISBUILD\n"
+        ERRORS+="$(echo -e $THISBUILD | tail)\n"
+       FAILEDMODULES+="$module "
     fi
     popd
   done
@@ -37,10 +39,11 @@ cd tools
 git clone https://github.com/JavaMoney/javamoney-lib.git
 cd javamoney-lib
 THISBUILD="\nBUILDING javamoney-lib\n"
-THISBUILD+=$(mvn install -Dmaven.test.skip=true  |& tee >(tail >&5) 
+THISBUILD+=$(mvn install -Dmaven.test.skip=true  |& tee >(cat - >&5) 
    if [ ${PIPESTATUS[0]} -ne 0 ]; then exit 1; fi )
 if [ $? -ne 0 ]; then 
-   ERRORS+="$THISBUILD\n"
+   ERRORS+="$( echo -e $THISBUILD | tail)\n"
+   FAILEDMODULES+="javamoney-lib "
 fi
 
 cd ..
@@ -50,11 +53,12 @@ git clone https://github.com/$githubAccount/crypto.git
 cd crypto
 git remote add upstream https://github.com/mifosio/crypto.git
 chmod +x gradlew
-THISBUILD="\nBUILDING $module\n"
-THISBUILD+=$(./gradlew publishToMavenLocal |& tee >(tail >&5) 
+THISBUILD="\nBUILDING crypto\n"
+THISBUILD+=$(./gradlew publishToMavenLocal |& tee >(cat -  >&5) 
     if [ ${PIPESTATUS[0]} -ne 0 ]; then exit 1; fi )
 if [ $? -ne 0 ]; then 
-    ERRORS+="$THISBUILD\n"
+    ERRORS+="$(echo -e $THISBUILD | tail) \n"
+    FAILEDMODULES+="crypto "
 fi
 
 cd ..
@@ -76,10 +80,11 @@ cd test-accounting-portfolio
 git remote add upstream 
https://github.com/mifosio/test-accounting-portfolio.git
 chmod +x gradlew
 THISBUILD="\nBUILDING test-accounting-portfolio\n"
-THISBUILD+=$( ./gradlew build |& tee >(tail >&5) 
+THISBUILD+=$( ./gradlew build |& tee >(cat - >&5)
    if [ ${PIPESTATUS[0]} -ne 0 ]; then exit 1; fi )
 if [ $? -ne 0 ]; then 
-   ERRORS+="$THISBUILD\n"
+   ERRORS+="$(echo -e $THISBUILD | tail)\n"
+   FAILEDMODULES+="test-accounting-portfolio "
 fi
 # exit integration-tests directory
 cd ..
@@ -100,4 +105,5 @@ if [ ! -z "$ERRORS" ] ; then
        echo "********************"
        echo "Build errors found:"
        echo "********************"
+       echo "The following modules failed to build: $FAILEDMODULES"
 fi

-- 
To stop receiving notification emails like this one, please contact
my...@apache.org.

Reply via email to