]> git.mxchange.org Git - jcontacts-business-core.git/blobdiff - dist.sh
Rewrite:
[jcontacts-business-core.git] / dist.sh
diff --git a/dist.sh b/dist.sh
old mode 100644 (file)
new mode 100755 (executable)
index 0e3b4c6..f48251e
--- a/dist.sh
+++ b/dist.sh
@@ -1,10 +1,23 @@
 #!/bin/sh
 
-NAME="jcontacts-business-core"
+NAME="${PWD##*/}"
+DIST="dist/${NAME}.jar"
 LIST=`find ../*/lib/${NAME}.jar`
 LIST="${LIST} `find ../*/*-ejb/lib/${NAME}.jar`"
+LIST="${LIST} ${HOME}/gf_domains/domain1/lib/"
 
-for entry in ${LIST};
+for target in ${LIST};
 do
-       cp -v dist/${NAME}.jar ${entry}
+       if [ ! -f "${DIST}" ]
+       then
+               echo "$0: '${DIST}' not found."
+       elif [ -d "${target}" ]
+       then
+               cp -v "${DIST}" "${target}"
+       elif [ -f "${target}" ]
+       then
+               cp -v "${DIST}" "${target}"
+       else
+               echo "$0: Target '${target}' not found."
+       fi
 done