FELIX-4529 look for gosh_profile in bundle at /ext to allow fragment to over-ride.


git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1607645 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/gogo/shell/src/main/java/org/apache/felix/gogo/shell/Shell.java b/gogo/shell/src/main/java/org/apache/felix/gogo/shell/Shell.java
index fef5daf..895b577 100644
--- a/gogo/shell/src/main/java/org/apache/felix/gogo/shell/Shell.java
+++ b/gogo/shell/src/main/java/org/apache/felix/gogo/shell/Shell.java
@@ -23,6 +23,7 @@
 import java.io.InputStreamReader;
 import java.io.Reader;
 import java.net.URI;
+import java.net.URL;
 import java.net.URLConnection;
 import java.nio.CharBuffer;
 import java.util.ArrayList;
@@ -106,7 +107,11 @@
             URI uri = baseURI.resolve("etc/gosh_profile");
             if (!new File(uri).exists())
             {
-                uri = getClass().getResource("/gosh_profile").toURI();
+                URL url = getClass().getResource("/ext/gosh_profile");
+                if (url == null) {
+                    url = getClass().getResource("/gosh_profile");
+                }
+                uri = (url == null) ? null : url.toURI();
             }
             if (uri != null)
             {