Blame SOURCES/eclipse-support-scls-for-symlink-script.patch

066e0a
diff --git dependencies/replace_platform_plugins_with_symlinks.sh dependencies/replace_platform_plugins_with_symlinks.sh
066e0a
index febe616..e9cad48 100755
066e0a
--- dependencies/replace_platform_plugins_with_symlinks.sh
066e0a
+++ dependencies/replace_platform_plugins_with_symlinks.sh
066e0a
@@ -3,21 +3,20 @@
066e0a
 # Then into plugins, and then symlinks 
066e0a
 
066e0a
 # SCL java dir is different from default
066e0a
-SCL_JAVA_DIR=$2
066e0a
+SCL_JAVA_DIRS=${@:2}
066e0a
 
066e0a
 function _symlink {
066e0a
 	_f=`ls | grep -e "^$1"`
066e0a
 	rm -rf $_f
066e0a
-	if [ -f ${SCL_JAVA_DIR}/$2  ]; then
066e0a
-		echo "found ${SCL_JAVA_DIR}/$2"
066e0a
-		ln -s ${SCL_JAVA_DIR}/$2 ${_f%.jar}.jar
066e0a
-	elif [ -f /usr/share/java/$2 ]; then
066e0a
-		echo "found /usr/share/java/$2"
066e0a
-		ln -s /usr/share/java/$2 ${_f%.jar}.jar
066e0a
-	else
066e0a
-		echo "not found ${SCL_JAVA_DIR}/$2 or /usr/share/java/$2"
066e0a
-		exit 1
066e0a
-	fi
066e0a
+	for SCL_JAVA_DIR in ${SCL_JAVA_DIRS}; do
066e0a
+		if [ -f ${SCL_JAVA_DIR}/$2  ]; then
066e0a
+			echo "found ${SCL_JAVA_DIR}/$2"
066e0a
+			ln -s ${SCL_JAVA_DIR}/$2 ${_f%.jar}.jar
066e0a
+			return 0
066e0a
+		fi
066e0a
+	done
066e0a
+	echo "not found $2 in any of ${SCL_JAVA_DIRS}"
066e0a
+	exit 1
066e0a
 }
066e0a
 
066e0a
 pushd $1
066e0a
diff --git testbundle-to-eclipse-test/gatherBundles.sh testbundle-to-eclipse-test/gatherBundles.sh
066e0a
index a388f4e..4379357 100755
066e0a
--- testbundle-to-eclipse-test/gatherBundles.sh
066e0a
+++ testbundle-to-eclipse-test/gatherBundles.sh
066e0a
@@ -32,15 +32,13 @@ pushd $sdk >/dev/null
066e0a
 	      (cd $eclipse/dropins/$f/eclipse;
066e0a
 				ls -d plugins/* features/* 2>/dev/null) |
066e0a
 	      while read g; do
066e0a
-		  [ ! -e $g ] && \
066e0a
-		    ln -s $eclipse/dropins/$f/eclipse/$g $g
066e0a
+		    ln -sf $eclipse/dropins/$f/eclipse/$g $g
066e0a
 	      done
066e0a
           else
066e0a
 	      (cd $eclipse/dropins/$f;
066e0a
 				ls -d plugins/* features/* 2>/dev/null) |
066e0a
 	      while read g; do
066e0a
-	          [ ! -e $g ] && \
066e0a
-		    ln -s $eclipse/dropins/$f/$g $g
066e0a
+		    ln -sf $eclipse/dropins/$f/$g $g
066e0a
 	      done
066e0a
           fi
066e0a
       done
066e0a
@@ -50,15 +48,13 @@ pushd $sdk >/dev/null
066e0a
 	      (cd $datadir/dropins/$f/eclipse;
066e0a
 				ls -d plugins/* features/* 2>/dev/null) |
066e0a
 	      while read g; do
066e0a
-		  [ ! -e $g ] && \
066e0a
-		    ln -s $datadir/dropins/$f/eclipse/$g $g
066e0a
+		    ln -sf $datadir/dropins/$f/eclipse/$g $g
066e0a
 	      done
066e0a
           else
066e0a
 	      (cd $datadir/dropins/$f;
066e0a
 				ls -d plugins/* features/* 2>/dev/null) |
066e0a
 	      while read g; do
066e0a
-	          [ ! -e $g ] && \
066e0a
-		    ln -s $datadir/dropins/$f/$g $g
066e0a
+		    ln -sf $datadir/dropins/$f/$g $g
066e0a
 	      done
066e0a
           fi
066e0a
       done