Author: gertv
Date: Tue Jul 16 06:00:01 2013
New Revision: 1503566
URL: http://svn.apache.org/r1503566
Log:
Adding script provided by Wim Verreydt
Added:
servicemix/scripts/smx-multiple-bundle-versions.sh (with props)
Added: servicemix/scripts/smx-multiple-bundle-versions.sh
URL:
http://svn.apache.org/viewvc/servicemix/scripts/smx-multiple-bundle-versions.sh?rev=1503566&view=auto
==============================================================================
--- servicemix/scripts/smx-multiple-bundle-versions.sh (added)
+++ servicemix/scripts/smx-multiple-bundle-versions.sh Tue Jul 16 06:00:01 2013
@@ -0,0 +1,43 @@
+#!/bin/bash
+#
+# Find all bundles with multiple versions in the features files.
+#
+# - we assume that all xml files that contain the artifactid and bundle
version
+# are features files
+# - we assume this file follows the convention so that each bundle
+# with artifact id and version) is on an seperate line)
+#
+# Usage:
+# $ ./smx-multiple-bundle-versions.sh [path_to_system_folder]
+
+if [ $# -eq 0 ]
+ then
+ echo "Please supply the path to the system folder" >&2
+ exit 1
+fi
+
+export dir=$1
+# Extract directories with multiple versions
+for i in $( find $dir -name '*.jar' | sed -n 's/\(.*\)\/.*\/.*/\1/p' | uniq -d
); do
+
+ # For each artifact folder with multiple versions
+
+ for j in $(find $i -name '*.jar'); do
+
+ # For each Jar in the artifact folder
+
+ export result=$(echo $j | sed -n
's/.*\/\(.*\)\/\(.*\)-.*/\2:\1/p')
+ export artifact=$(echo $result | cut -d : -f 1)
+ export version=$(echo $result | cut -d : -f 2)
+
+ echo $artifact - $version
+
+ # Find each occurence of the artifactid and the version on the
same line in all
+ # XML files. Filenames will only be printed once on multiple
occurences.
+ grep --include *.xml -r $artifact.*$version $dir | cut -d : -f
1 | uniq
+
+ echo
+ done
+ echo -----
+ echo
+done
Propchange: servicemix/scripts/smx-multiple-bundle-versions.sh
------------------------------------------------------------------------------
svn:executable = *