From c73c565a70f2ce1932bf4bcdbd8553ecaae36c70 Mon Sep 17 00:00:00 2001
From: =?utf8?q?Roland=20H=C3=A4der?= <roland@mxchange.org>
Date: Thu, 27 Apr 2017 13:01:32 +0200
Subject: [PATCH] cleanup is now done separately and only if requested. Yes,
 getting messy ...
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit

Signed-off-by: Roland Häder <roland@mxchange.org>
---
 build-dist-all.sh | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/build-dist-all.sh b/build-dist-all.sh
index c5ae10f..5c2da77 100755
--- a/build-dist-all.sh
+++ b/build-dist-all.sh
@@ -27,8 +27,14 @@ for project in ${LIST}; do
 
 	if [ -x "${ANT_BIN}" -a "$1" != "d" ]
 	then
-		# Cleanup project and build JAR
-		${ANT_BIN} clean jar
+		if [ "$1" = "c" ]
+		then
+			# Cleanup
+			${ANT_BIN} clean
+		fi
+
+		# Build JAR
+		${ANT_BIN} jar
 
 		# Save status
 		STATUS="$?"
@@ -37,7 +43,7 @@ for project in ${LIST}; do
 		if [ "${STATUS}" != "0" ]
 		then
 			# This has failed, so try "dist"
-			${ANT_BIN} clean dist
+			${ANT_BIN} dist
 			STATUS="$?"
 
 			# Still failing? Oh, to bad
-- 
2.39.5