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