cvsdist 38d0d0
#! /bin/sh
cvsdist 38d0d0
cvsdist 38d0d0
# We need to make our own copy of the eclipse platform in order to
cvsdist 38d0d0
# build against it.  We do this since the build root might already
cvsdist 38d0d0
# contain a copy of the plugin we are building -- and the eclipse
cvsdist 38d0d0
# releng scripts fail in this situation.  We put this script in the
cvsdist 38d0d0
# eclipse core so that it is easy to use from other spec files.
cvsdist 38d0d0
cvsdist 38d0d0
# Arguments are:
cvsdist 38d0d0
# * directory where results should end up (script will make it)
cvsdist 38d0d0
# * base location of eclipse platform install
cvsdist 8c8401
# * an optional string that is used to select non-platform
cvsdist 8c8401
#   plugins and features.  At present if a plugin or feature has
cvsdist 8c8401
#   this as a substring, it will be included.  You need only run
cvsdist 8c8401
#   this script once, it will link both the platform and the other
cvsdist 8c8401
#   optionally-selected parts in a single invocation.
bbd9a4
bbd9a4
# Test to see if the minimum arguments
bbd9a4
# are specified
bbd9a4
bbd9a4
if [ $# -lt 2 ]; then
bbd9a4
  echo "Usage: copy-platform where eclipse_base optional_directories"
bbd9a4
  echo "For example: copy-plaform ~/SDK /usr/share/eclipse cdt pydev jdt"
bbd9a4
  exit 1
bbd9a4
fi
bbd9a4
bbd9a4
where=$1; shift
bbd9a4
eclipse=$1; shift
cvsdist 38d0d0
a882c3
mkdir -p $where/plugins $where/features $where/links
cvsdist 38d0d0
cd $where
cvsdist 38d0d0
bbd9a4
# Are there any optional arguments left?
bbd9a4
if [ $# -gt 0 ]; then
bbd9a4
   for optional in "$@"; do
bbd9a4
      (cd $eclipse; ls -d plugins/*"$optional"* features/*"$optional"*) |
bbd9a4
      while read f; do
a882c3
         [ ! -e $f ] && ln -s $eclipse/$f $f
bbd9a4
      done
cvsdist 8c8401
   done
cvsdist 8c8401
fi
cvsdist 8c8401
cvsdist 38d0d0
# Code after this point is automatically created by eclipse.spec.