[Kde-extra-gear] cvsExtract patch

Klas Kalass kde-extra-gear@mail.kde.org
Mon, 10 Feb 2003 17:13:54 +0100


--Boundary-03=_C/8R+P3JfSA8b7V
Content-Type: multipart/mixed;
  boundary="Boundary-01=_C/8R+JIHRAjSquF"
Content-Transfer-Encoding: 7bit
Content-Description: signed data
Content-Disposition: inline

--Boundary-01=_C/8R+JIHRAjSquF
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Description: body text
Content-Disposition: inline

Am Montag, 10. Februar 2003 16:46 schrieb Sebastian Trueg:
> On Monday 10 February 2003 15:52, Klas Kalass wrote:
> > Am Montag, 10. Februar 2003 15:33 schrieb Sebastian Trueg:
> > I have a small nitpick again, but will do this when you commited (I don=
't
> > like side-effects, even in shell-scripts)
>
> what do you mean?
I meant that your function is pre-destined to return the languages as a ret=
urn=20
value and not to modify the global variable, because it is called=20
getAvailableLanguages and obviously its reason is not to retrieve anything =
to=20
disk or such. But I know that in this context it is pretty weak.

See the attached diff.

--Boundary-01=_C/8R+JIHRAjSquF
Content-Type: text/x-diff;
  charset="iso-8859-1";
  name="diff"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename="diff"

Index: cvsExtract.sh
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/kde/kdeextragear-1/scripts/cvsExtract.sh,v
retrieving revision 1.10
diff -u -3 -p -r1.10 cvsExtract.sh
=2D-- cvsExtract.sh	10 Feb 2003 15:46:25 -0000	1.10
+++ cvsExtract.sh	10 Feb 2003 16:13:41 -0000
@@ -406,7 +406,7 @@ function mergeToplevelFiles {
 # $1: where to get the files from (CVS|LOCAL)
 #
 function getAvailableLanguages {
=2D    echo "Retrieving complete list of available languages..."
+    echo "Retrieving complete list of available languages..." >&2
     case $1 in
 	CVS)
 	    cvs -z4 -q -d "$CVSROOT" co -P kde-i18n/subdirs > /dev/null 2>&1
@@ -415,9 +415,10 @@ function getAvailableLanguages {
 	    cp  -a ${CVSBASEDIR}/${KDEI18N}/subdirs kde-i18n
 	    ;;
     esac
=2D    LANGUAGES=3D"$(cat kde-i18n/subdirs)"
=2D    echo "available languages: $LANGUAGES"
+    ALLLANGUAGES=3D"$(cat kde-i18n/subdirs)"
+    echo "available languages: $ALLLANGUAGES" >&2
     rm -r kde-i18n
+    echo $ALLLANGUAGES
 }
=20
 #----------------------------------------------------------#
@@ -479,7 +480,7 @@ getAdminDir "${RETRIEVAL_METHOD}" "admin
 # if no languages are specified get the complete list from kde-i18n
 if [ $GETI18N =3D "yes" ]; then
     if [ -z "$LANGUAGES" ]; then
=2D	getAvailableLanguages "${RETRIEVAL_METHOD}"
+	LANGUAGES=3D`getAvailableLanguages "${RETRIEVAL_METHOD}"`
     fi
 fi
=20

--Boundary-01=_C/8R+JIHRAjSquF--

--Boundary-03=_C/8R+P3JfSA8b7V
Content-Type: application/pgp-signature
Content-Description: signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQA+R8/CyPp3mvWRmvgRAmBoAKDEWL/AB1nO0PuDcUl+HUCZtRJLYgCg8yEB
oJLdET12agqmXhwBqN3vPik=
=D5we
-----END PGP SIGNATURE-----

--Boundary-03=_C/8R+P3JfSA8b7V--