[Kde-extra-gear] cvsExtract patch

Sebastian Trueg kde-extra-gear@mail.kde.org
Sun, 9 Feb 2003 18:42:17 +0100


On Sunday 09 February 2003 17:03, Klas Kalass wrote:
> Am Sonntag, 9. Februar 2003 13:28 schrieb Sebastian Trueg:
> > Hy,
> >
> > I added two things to cvsExtract.sh:
> > 1. All available languages in kde-i18n are searched for a translation
> > (from cvs2dist)
> > 2. no documentation option
>
> +    -nodoc                    Do not try to get any documentation.
> +    -noi18n                   Do not search for any translations.
>
> Some nitpicking: The script adheres to the convention that long optionn=
ames
> are always with two "-" signs, so I would prefer --nodoc and --noi18n.
>

ok.=20

> @@ -184,6 +195,25 @@ APPDIR=3D${APPNAME}
>  [ -z "$TARGETDIR" ] && TARGETDIR=3D"${APPDIR}-${APPVERSION}-BUILD"
>
>
> +# if no languages are specified get the complete list from kde-i18n
> +if [ $GETI18N =3D "yes" ]; then
> +    if [ -z "$LANGUAGES" ]; then
> +       echo "Retrieving complete list of available languages..."
> +       case "${RETRIEVAL_METHOD}" in
> +           CVS)
> +               cvs -z4 -q -d "$CVSROOT" co -P kde-i18n/subdirs > /dev/=
null
> 2>&1 +               ;;
> +           LOCAL)
> +               cp  -a ${CVSBASEDIR}/${KDEI18N}/subdirs kde-i18n
> +               ;;
> +       esac
> +       LANGUAGES=3D"$(cat kde-i18n/subdirs)"
>
> Does this really work? looks like make syntax to me...
>

works for me. I got this from cvs2dist.

> +       echo "available languages: $LANGUAGES"
> +       rm -r kde-i18n
> +    fi
> +fi
>
> Please do not put actual code like this above the "MAIN" section, but
> rather inside. It does not matter code-wise but I think it is easier to
> maintain if the distinction is kept.
>

so should I create a function and call it?

> Regards,
>   Klas