Added install feedback to print out bundle ID (FELIX-176).
git-svn-id: https://svn.apache.org/repos/asf/incubator/felix/trunk@476521 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/shell/src/main/java/org/apache/felix/shell/impl/InstallCommandImpl.java b/shell/src/main/java/org/apache/felix/shell/impl/InstallCommandImpl.java
index 20f3f8b..efd8d54 100644
--- a/shell/src/main/java/org/apache/felix/shell/impl/InstallCommandImpl.java
+++ b/shell/src/main/java/org/apache/felix/shell/impl/InstallCommandImpl.java
@@ -60,10 +60,27 @@
// There should be at least one URL.
if (st.countTokens() >= 1)
{
+ StringBuffer sb = new StringBuffer();
while (st.hasMoreTokens())
{
String location = st.nextToken().trim();
- install(location, out, err);
+ Bundle bundle = install(location, out, err);
+ if (bundle != null)
+ {
+ if (sb.length() > 0)
+ {
+ sb.append(", ");
+ }
+ sb.append(bundle.getBundleId());
+ }
+ }
+ if (sb.toString().indexOf(',') > 0)
+ {
+ out.println("Bundle IDs: " + sb.toString());
+ }
+ else
+ {
+ out.println("Bundle ID: " + sb.toString());
}
}
else
@@ -145,4 +162,4 @@
}
return guess;
}
-}
\ No newline at end of file
+}