From: Roland Häder <roland@mxchange.org>
Date: Tue, 15 Aug 2017 20:54:32 +0000 (+0200)
Subject: updated dist.sh
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=dcd0338ecad1e8f82ca5bfc48a89009d48b20f85;p=pizzaservice-lib.git

updated dist.sh

Signed-off-by: Roland Häder <roland@mxchange.org>
---

diff --git a/dist.sh b/dist.sh
index 0206322..b5df710 100755
--- a/dist.sh
+++ b/dist.sh
@@ -45,16 +45,21 @@ fi
 LIST=$(find ../*/lib/${NAME}.jar)
 LIST="${LIST} ${WILDFLY_MODULE_PATH}"
 
-if [ -d "${GLASSFISH_BASE_PATH}" ]
+if [ "${NAME}" != "jcore" -a "${NAME}" != "jcore-swing" ]
 then
-	echo "$0: Glassfish personal domain found, adding to LIST ..."
-	LIST="${LIST} ${GLASSFISH_BASE_PATH}"
-fi
+	if [ -d "${GLASSFISH_BASE_PATH}" ]
+	then
+		echo "$0: Glassfish personal domain found, adding to LIST ..."
+		LIST="${LIST} ${GLASSFISH_BASE_PATH}"
+	fi
 
-if [ -d "${PERSONAL_DOMAIN_PATH}" ]
-then
-	echo "$0: Personal domain found, adding to LIST ..."
-	LIST="${LIST} ${PERSONAL_DOMAIN_PATH}"
+	if [ -d "${PERSONAL_DOMAIN_PATH}" ]
+	then
+		echo "$0: Personal domain found, adding to LIST ..."
+		LIST="${LIST} ${PERSONAL_DOMAIN_PATH}"
+	fi
+else
+	echo "$0: Not going to add '${NAME}' to distribution list, is JavaSE project."
 fi
 
 if [ ! -f "${DIST}" ]
@@ -82,13 +87,12 @@ do
 	fi
 done
 
-if [ -n "${GLASSFISH_SSH_USER}" -a -n "${GLASSFISH_SSH_SERVER}" -a -n "${GLASSFISH_SSH_PATH}" ]
+if [ "$1" = "r" -o "${NAME}" = "jcore" -o "${NAME}" = "jcore-swing" ]
 then
-	if [ "$1" != "r" -a "${NAME}" != "jcore" -a "${NAME}" != "jcore-swing" ]
-	then
-		echo "$0: Copying to remote '${GLASSFISH_SSH_SERVER}' ..."
-		scp "${DIST}" "${GLASSFISH_SSH_USER}@${GLASSFISH_SSH_SERVER}:${GLASSFISH_SSH_PATH}" || exit 255
-	fi
+	echo "$0: Not uploading '${NAME}' or parameter 'r' provided."
+elif [ -n "${GLASSFISH_SSH_USER}" -a -n "${GLASSFISH_SSH_SERVER}" -a -n "${GLASSFISH_SSH_PATH}" ]
+	echo "$0: Copying to remote '${GLASSFISH_SSH_SERVER}' ..."
+	scp "${DIST}" "${GLASSFISH_SSH_USER}@${GLASSFISH_SSH_SERVER}:${GLASSFISH_SSH_PATH}" || exit 255
 else
 	echo "$0: SSH upload disabled."
 fi