]> git.mxchange.org Git - jcore-swing.git/commitdiff
Updated dist.sh
authorRoland Haeder <roland@mxchange.org>
Fri, 19 Feb 2016 13:39:19 +0000 (14:39 +0100)
committerRoland Haeder <roland@mxchange.org>
Fri, 19 Feb 2016 13:39:19 +0000 (14:39 +0100)
Signed-off-by: Roland Häder <roland@mxchange.org>
dist.sh

diff --git a/dist.sh b/dist.sh
index 0e0977980b65c02c0fc5b8cb8e04d25aa04a85d0..a0a77ede7c9cfd7d51d802a0c1dab98b3f18f683 100755 (executable)
--- a/dist.sh
+++ b/dist.sh
@@ -6,14 +6,40 @@ NAME="${PWD##*/}"
 # Generated JAR file
 DIST="dist/${NAME}.jar"
 
+# WildFly module base path
+WILDFLY_MODULE_BASE_PATH="${HOME}/wildfly_domain/modules/org/mxchange"
+
+# And for this "module" (as WildFly calls it)
+WILDFLY_MODULE_PATH="${WILDFLY_MODULE_BASE_PATH}/${NAME}/main"
+
+# module.xml
+WILDFLY_MODULE_XML_FILE="wildfly/module.xml"
+
+# Glassfish base path (domain)
+GLASSFISH_BASE_PATH="${HOME}/gf_domain/lib"
+
 # Generate list
 LIST=`find ../*/lib/${NAME}.jar`
 LIST="${LIST} `find ../*/*-ejb/lib/${NAME}.jar`"
+LIST="${LIST} ${WILDFLY_MODULE_PATH}"
+
+if [ -d "${GLASSFISH_BASE_PATH}" ]
+then
+       echo "$0: Glassfish personal domain found, adding to LIST ..."
+       LIST="${LIST} ${GLASSFISH_BASE_PATH}"
+fi
 
 if [ ! -f "${DIST}" ]
 then
        echo "$0: '${DIST}' not found."
        exit 1
+elif [ ! -d "${WILDFLY_MODULE_BASE_PATH}" ]
+then
+       echo "$0: WildFly base path '${WILDFLY_MODULE_BASE_PATH}' not created."
+       exit 1
+elif [ ! -d "${WILDFLY_MODULE_PATH}" ]
+then
+       mkdir -vp "${WILDFLY_MODULE_PATH}"
 fi
 
 for target in ${LIST};
@@ -29,5 +55,14 @@ do
        fi
 done
 
+# Copy module.xml ...
+if [ -f "${WILDFLY_MODULE_XML_FILE}" ]
+then
+       echo "$0: Generating module.xml ..."
+       XML_CONTENT=`cat "${WILDFLY_MODULE_XML_FILE}"`
+       XML_CONTENT="${XML_CONTENT//NAME/$NAME}"
+       echo "${XML_CONTENT}" > "${WILDFLY_MODULE_PATH}/module.xml"
+fi
+
 echo "$0: All done."
 exit 0