Signed-off-by: Roland Häder <roland@mxchange.org>
-#!/bin/sh
+#!/bin/bash
+# Name of this project, detected by it's base path
NAME="${PWD##*/}"
+
+# Generated JAR file
DIST="dist/${NAME}.jar"
+
+# Generate list
LIST=`find ../*/lib/${NAME}.jar`
LIST="${LIST} `find ../*/*-ejb/lib/${NAME}.jar`"
-LIST="${LIST} ${HOME}/gf_domains/domain1/lib/"
+
+if [ ! -f "${DIST}" ]
+then
+ echo "$0: '${DIST}' not found."
+ exit 1
+fi
for target in ${LIST};
do
- if [ ! -f "${DIST}" ]
- then
- echo "$0: '${DIST}' not found."
- elif [ -d "${target}" ]
+ if [ -d "${target}" ]
then
cp -v "${DIST}" "${target}"
elif [ -f "${target}" ]
echo "$0: Target '${target}' not found."
fi
done
+
+echo "$0: All done."
+exit 0