]> git.mxchange.org Git - jprojects-scripts.git/commitdiff
added cp-libs.sh for a quick way of distributing libs ...
authorRoland Haeder <roland@mxchange.org>
Mon, 9 May 2016 16:41:26 +0000 (18:41 +0200)
committerRoland Haeder <roland@mxchange.org>
Mon, 9 May 2016 16:48:05 +0000 (18:48 +0200)
Signed-off-by: Roland Haeder <roland@mxchange.org>
cp-libs.sh [new file with mode: 0755]

diff --git a/cp-libs.sh b/cp-libs.sh
new file mode 100755 (executable)
index 0000000..fab385a
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+source .jprojects.sh
+
+LIBS=`find lib/ -type f -name *.jar 2>/dev/null`
+
+if [ -z "${LIBS}" ]
+then
+       echo "$0: No libraries to distribute."
+       exit 1
+fi
+
+for lib in ${LIBS}; do
+       echo "$0: Copying lib '${lib}' ..."
+       find */lib/${lib##*/} -exec cp ${lib} {} \;
+       rm -f "${lib}"
+done
+
+echo "$0: All done."
+exit 0