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