| 1 |
cvsdist |
1.1 |
#! /bin/sh
|
| 2 |
|
|
|
| 3 |
|
|
# We need to make our own copy of the eclipse platform in order to
|
| 4 |
|
|
# build against it. We do this since the build root might already
|
| 5 |
|
|
# contain a copy of the plugin we are building -- and the eclipse
|
| 6 |
|
|
# releng scripts fail in this situation. We put this script in the
|
| 7 |
|
|
# eclipse core so that it is easy to use from other spec files.
|
| 8 |
|
|
|
| 9 |
|
|
# Arguments are:
|
| 10 |
|
|
# * directory where results should end up (script will make it)
|
| 11 |
|
|
# * base location of eclipse platform install
|
| 12 |
cvsdist |
1.2 |
# * an optional string that is used to select non-platform
|
| 13 |
|
|
# plugins and features. At present if a plugin or feature has
|
| 14 |
|
|
# this as a substring, it will be included. You need only run
|
| 15 |
|
|
# this script once, it will link both the platform and the other
|
| 16 |
|
|
# optionally-selected parts in a single invocation.
|
| 17 |
pmuldoon |
1.3 |
|
| 18 |
|
|
# Test to see if the minimum arguments
|
| 19 |
|
|
# are specified
|
| 20 |
|
|
|
| 21 |
|
|
if [ $# -lt 2 ]; then
|
| 22 |
|
|
echo "Usage: copy-platform where eclipse_base optional_directories"
|
| 23 |
overholt |
1.8 |
echo "For example: copy-plaform ~/SDK /usr/lib/eclipse cdt pydev jdt"
|
| 24 |
pmuldoon |
1.3 |
exit 1
|
| 25 |
|
|
fi
|
| 26 |
|
|
|
| 27 |
|
|
where=$1; shift
|
| 28 |
|
|
eclipse=$1; shift
|
| 29 |
cvsdist |
1.1 |
|
| 30 |
overholt |
1.8 |
datadir=/usr/share/eclipse
|
| 31 |
|
|
|
| 32 |
overholt |
1.7 |
mkdir -p $where/plugins $where/features
|
| 33 |
cvsdist |
1.1 |
cd $where
|
| 34 |
cvsdist |
1.2 |
|
| 35 |
pmuldoon |
1.3 |
# Are there any optional arguments left?
|
| 36 |
|
|
if [ $# -gt 0 ]; then
|
| 37 |
|
|
for optional in "$@"; do
|
| 38 |
|
|
(cd $eclipse; ls -d plugins/*"$optional"* features/*"$optional"*) |
|
| 39 |
|
|
while read f; do
|
| 40 |
mbooth |
1.6 |
[ ! -e $f ] && ln -s $eclipse/$f $f
|
| 41 |
pmuldoon |
1.3 |
done
|
| 42 |
overholt |
1.7 |
(cd $eclipse/dropins; ls -d *"$optional"*) |
|
| 43 |
|
|
while read f; do
|
| 44 |
|
|
if [ -e $eclipse/dropins/$f/eclipse ]; then
|
| 45 |
|
|
(cd $eclipse/dropins/$f/eclipse; ls -d plugins/* features/*) |
|
| 46 |
|
|
while read g; do
|
| 47 |
|
|
[ ! -e $g ] && \
|
| 48 |
|
|
ln -s $eclipse/dropins/$f/eclipse/$g $g
|
| 49 |
|
|
done
|
| 50 |
|
|
else
|
| 51 |
overholt |
1.8 |
(cd $eclipse/dropins/$f; ls -d plugins/* features/*) |
|
| 52 |
overholt |
1.7 |
while read g; do
|
| 53 |
|
|
[ ! -e $g ] && \
|
| 54 |
overholt |
1.9 |
ln -s $eclipse/dropins/$f/$g $g
|
| 55 |
overholt |
1.7 |
done
|
| 56 |
|
|
fi
|
| 57 |
|
|
done
|
| 58 |
overholt |
1.8 |
(cd $datadir/dropins; ls -d *"$optional"*) |
|
| 59 |
|
|
while read f; do
|
| 60 |
|
|
if [ -e $datadir/dropins/$f/eclipse ]; then
|
| 61 |
|
|
(cd $datadir/dropins/$f/eclipse; ls -d plugins/* features/*) |
|
| 62 |
|
|
while read g; do
|
| 63 |
|
|
[ ! -e $g ] && \
|
| 64 |
|
|
ln -s $datadir/dropins/$f/eclipse/$g $g
|
| 65 |
|
|
done
|
| 66 |
|
|
else
|
| 67 |
|
|
(cd $datadir/dropins/$f; ls -d plugins/* features/*) |
|
| 68 |
|
|
while read g; do
|
| 69 |
|
|
[ ! -e $g ] && \
|
| 70 |
|
|
ln -s $datadir/dropins/$g $g
|
| 71 |
|
|
done
|
| 72 |
|
|
fi
|
| 73 |
|
|
done
|
| 74 |
cvsdist |
1.2 |
done
|
| 75 |
|
|
fi
|
| 76 |
cvsdist |
1.1 |
|
| 77 |
|
|
# Code after this point is automatically created by eclipse.spec.
|