Log build failures and provide summary at end of run
diff --git a/scripts/Unix/initial-setup.sh b/scripts/Unix/initial-setup.sh
index 75ce49e..eddd89f 100755
--- a/scripts/Unix/initial-setup.sh
+++ b/scripts/Unix/initial-setup.sh
@@ -1,20 +1,26 @@
 #!/bin/bash
 githubAccount=$1
 
+exec 5>&1
 # REM create core folder
 mkdir -p core
 cd core
-
+ERRORS=""
 get_modules() {
   for module in $@
   do
     git clone https://github.com/$githubAccount/$module.git
-    cd $module
+    pushd $module
     git remote add upstream https://github.com/mifosio/$module.git
     # For some reason permission is denied
     chmod +x gradlew
-    ./gradlew publishToMavenLocal
-    cd ..
+    THISBUILD="\nBUILDING $module\n"
+    THISBUILD+=$(./gradlew publishToMavenLocal |& tee >(tail >&5) 
+    	if [ ${PIPESTATUS[0]} -ne 0 ]; then exit 1; fi )
+    if [ $? -ne 0 ]; then 
+        ERRORS+="$THISBUILD\n"
+    fi
+    popd
   done
 }
 
@@ -30,7 +36,12 @@
 # REM initialize javamoney
 git clone https://github.com/JavaMoney/javamoney-lib.git
 cd javamoney-lib
-mvn install -Dmaven.test.skip=true
+THISBUILD="\nBUILDING javamoney-lib\n"
+THISBUILD+=$(mvn install -Dmaven.test.skip=true  |& tee >(tail >&5) 
+   if [ ${PIPESTATUS[0]} -ne 0 ]; then exit 1; fi )
+if [ $? -ne 0 ]; then 
+   ERRORS+="$THISBUILD\n"
+fi
 
 cd ..
 
@@ -39,7 +50,13 @@
 cd crypto
 git remote add upstream https://github.com/mifosio/crypto.git
 chmod +x gradlew
-./gradlew publishToMavenLocal
+THISBUILD="\nBUILDING $module\n"
+THISBUILD+=$(./gradlew publishToMavenLocal |& tee >(tail >&5) 
+    if [ ${PIPESTATUS[0]} -ne 0 ]; then exit 1; fi )
+if [ $? -ne 0 ]; then 
+    ERRORS+="$THISBUILD\n"
+fi
+
 cd ..
 
 # exit tools directory
@@ -58,7 +75,12 @@
 cd test-accounting-portfolio
 git remote add upstream https://github.com/mifosio/test-accounting-portfolio.git
 chmod +x gradlew
-./gradlew build
+THISBUILD="\nBUILDING test-accounting-portfolio\n"
+THISBUILD+=$( ./gradlew build |& tee >(tail >&5) 
+   if [ ${PIPESTATUS[0]} -ne 0 ]; then exit 1; fi )
+if [ $? -ne 0 ]; then 
+   ERRORS+="$THISBUILD\n"
+fi
 # exit integration-tests directory
 cd ..
 
@@ -69,3 +91,13 @@
 npm i
 
 cd ..
+
+if [ ! -z "$ERRORS" ] ; then
+	echo "********************"
+	echo "Build errors found:"
+	echo "********************"
+	echo -e "$ERRORS"
+	echo "********************"
+	echo "Build errors found:"
+	echo "********************"
+fi