[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: kdeextragear-1/scripts
From:       Michael Buesch <mbuesch () freenet ! de>
Date:       2004-10-24 10:42:38
Message-ID: 200410241242.44890.mbuesch () freenet ! de
[Download RAW message or body]


Quoting Jeroen Wijnhout <wijnhout@science.uva.nl>:
> CVS commit by wijnhout: 
> 
> Introducing the 'exclude languages' option (-el or --exclude-languages switch).
> 
> 
>   M +27 -4     createPackage.sh   1.2
> 
> 
> --- kdeextragear-1/scripts/createPackage.sh  #1.1:1.2
> @@ -53,4 +53,7 @@
>                                 available languages will be included.
>                                 
> +    -el|--exclude-languages <LANGUAGES> Space seperated list of languages not to include
> +                                        in the package.
> +                               
>      -b|--builddir <DIRNAME>    Name of the temporary working directory where
>                                 all files will be put.
> @@ -326,8 +329,8 @@
>      if [ -z "$LANGUAGES" ]
>      then
> -        getResource "languagelist" $BUILDDIR
> -        if [ -e $BUILDDIR/subdirs ]
> +        getResource "languagelist" languagelist
> +        if [ -e $BUILDDIR/languagelist/subdirs ]
>          then
> -            LANGUAGES=`cat $BUILDDIR/subdirs`
> +            LANGUAGES=`cat $BUILDDIR/languagelist/subdirs`
>          else
>              print "ERROR:"
> @@ -338,4 +341,19 @@
>      fi
>      
> +    #Remove the excluded languages from the list
> +    LANGLIST=""
> +    for language in $LANGUAGES
> +    do
> +        EXCLUDE="false"
> +        for exclang in $EXCLUDELANGUAGES
> +        do
> +            if [ "$exclang" == "$language" ]
> +            then
> +                EXCLUDE="true"


You can do a "break" here. Microoptimisation. :)


> +            fi
> +        done
> +        if [ $EXCLUDE == "false" ]; then LANGLIST="$language $LANGLIST"; fi
> +    done
> +    LANGUAGES=$LANGLIST
>      print "Language list: $LANGUAGES."
>  }
> @@ -441,5 +459,4 @@
>      print "Retrieving documentation translations..."
>      
> -
>      for language in $INCLUDED_LANGUAGES
>      do
> @@ -527,4 +544,5 @@
>      PACKAGE="no"
>      LANGUAGES=""
> +    EXCLUDELANGUAGES="xx"
>      GNUFiles="AUTHORS COPYING ChangeLog INSTALL TODO README"
>      POSTPROCESSSCRIPT=""
> @@ -560,4 +578,9 @@
>              shift
>          ;;
> +        -el|--exclude-languages)
> +            testParameter $1 $2
> +            EXCLUDELANGUAGES="$2 $EXCLUDELANGUAGES"
> +            shift
> +        ;;
>          -m|--module)
>              testParameter $1 $2
> 
> 
> 
> 

-- 
Regards Michael Buesch  [ http://www.tuxsoft.de.vu ]


[Attachment #3 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic