From bbd9a49223043551b8ca9a289f890e8c2e1ce0df Mon Sep 17 00:00:00 2001 From: Phillip Muldoon Date: Thu, 28 Apr 2005 21:35:04 +0000 Subject: [PATCH] - Allow multiple optional arguments in eclipse-copy-platform.sh --- eclipse-copy-platform.sh | 26 +++++++++++++++++++------- eclipse.spec | 3 +++ 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/eclipse-copy-platform.sh b/eclipse-copy-platform.sh index ae9fb95..59d5bbe 100644 --- a/eclipse-copy-platform.sh +++ b/eclipse-copy-platform.sh @@ -14,18 +14,30 @@ # 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. -where=$1 -eclipse=$2 -optional=$3 + +# Test to see if the minimum arguments +# are specified + +if [ $# -lt 2 ]; then + echo "Usage: copy-platform where eclipse_base optional_directories" + echo "For example: copy-plaform ~/SDK /usr/share/eclipse cdt pydev jdt" + exit 1 +fi + +where=$1; shift +eclipse=$1; shift mkdir $where cd $where mkdir plugins features -if test -n "$optional"; then - (cd $eclipse; ls -d plugins/*"$optional"* features/*"$optional"*) | - while read f; do - ln -s $eclipse/$f $f +# 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 + ln -s $eclipse/$f $f + done done fi diff --git a/eclipse.spec b/eclipse.spec index b2aa67b..fda73b0 100644 --- a/eclipse.spec +++ b/eclipse.spec @@ -1033,6 +1033,9 @@ fi %{_datadir}/%{name}/plugins/org.eclipse.platform.source.linux.gtk.*_3.1.0 %changelog +* Thu Apr 28 2005 Phil Muldoon 3.1.0_fc-0.M6.13 +- Allow multiple optional arguments in eclipse-copy-platform.sh + * Wed Apr 27 2005 Andrew Overholt 3.1.0_fc-0.M6.13 - Include epoch in mozilla BuildRequires. - Remove last remaining gij-specific option from eclipse.script.