summaryrefslogtreecommitdiffstats
path: root/prepAllTestBundles.sh
diff options
context:
space:
mode:
authorRoland Grunberg <rgrunber@redhat.com>2013-10-08 13:25:49 -0400
committerRoland Grunberg <rgrunber@redhat.com>2013-10-08 13:25:49 -0400
commit24dcbf8771f27d61981018f687bff696106b955b (patch)
tree32af2198a74318629ee1f6a7ef741bd3a6e20eeb /prepAllTestBundles.sh
parent509744d875d8a227bdfc421596024f3e468e9539 (diff)
downloadtestbundle-to-eclipse-test-24dcbf8771f27d61981018f687bff696106b955b.tar.gz
testbundle-to-eclipse-test-24dcbf8771f27d61981018f687bff696106b955b.tar.xz
testbundle-to-eclipse-test-24dcbf8771f27d61981018f687bff696106b955b.zip
Handle case where multiple symlinked jars provide same OSGi bundle.
When all system OSGi bundles are symlinked, there is a chance that multiple locations may provide the same OSGi bundle. Although this is a violation of expected guidelines, handle this case anyways. Also suppress excessively verbose output.
Diffstat (limited to 'prepAllTestBundles.sh')
-rwxr-xr-xprepAllTestBundles.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/prepAllTestBundles.sh b/prepAllTestBundles.sh
index 4c72a37..ebf32d9 100755
--- a/prepAllTestBundles.sh
+++ b/prepAllTestBundles.sh
@@ -85,7 +85,10 @@ for jar in `find ${testBundleFolder} -name "*.jar"`; do
# Make 'Eclipse-BundleShape: dir'
jarName=`basename ${jar}`
symJarName=`ls target-sdk/plugins/ | grep ${jarName}`
- rm target-sdk/plugins/${symJarName}
+ # Might be multiple symlinked jars providing same bundle (rare)
+ for file in ${symJarName}; do
+ rm target-sdk/plugins/${file}
+ done
cp ${jar} target-sdk/plugins/
jar -umf ./MANIFEST.MF target-sdk/plugins/${jarName}