]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - buildSite.sh
Add security
[gpl/argeo-slc.git] / buildSite.sh
index d1abe4c425c69f186867bf86c2236da4295d390d..b84173dea55813dc4cde858c20f6cdb07bf5704c 100755 (executable)
@@ -16,8 +16,8 @@ EXIT_STATUS=0
 
 # BUILD
 mvn --fail-at-end deploy $PROFILES 2>&1 | tee deploy.log
-EXIT_STATUS=$?
-if [ $EXIT_STATUS eq 0 ]
+EXIT_STATUS=$PIPESTATUS
+if [ $EXIT_STATUS -eq 0 ]
 then
        mail -s "Build@$HOSTNAME SUCCESS - $DATE - $BUILD_DIR" $TO < pom.xml
 else
@@ -26,7 +26,7 @@ fi
 
 # SITE
 mvn --fail-at-end site-deploy $PROFILES 2>&1 | tee siteGeneration.log
-if [ $eq 0 ]
+if [ $PIPESTATUS -eq 0 ]
 then
        echo No need to send email for successful site generation
 else