--nextPart4478733.Gb2u3OK0XS Content-Type: multipart/mixed; boundary="Boundary-01=_71eXBXSouNoN52d" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_71eXBXSouNoN52d Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, I hacked something together for the cvs2dist to skip individual i18n languages for a package build. This is useful to skip the "xx" or known broken/incomplete languages in the final release package. I'm not a good bash coder, but I tried my best. Please review/comment. Patch is attached. Thanks. =2D-=20 Regards Michael Buesch [ http://www.tuxsoft.de.vu ] --Boundary-01=_71eXBXSouNoN52d Content-Type: text/x-diff; charset="us-ascii"; name="cvs2dist.skiplang.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="cvs2dist.skiplang.patch" Index: scripts/cvs2dist =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/kdesdk/scripts/cvs2dist,v retrieving revision 1.10 diff -u -p -r1.10 cvs2dist =2D-- scripts/cvs2dist 7 May 2004 06:57:18 -0000 1.10 +++ scripts/cvs2dist 1 Oct 2004 23:47:11 -0000 @@ -24,7 +24,7 @@ test -e ~/.cvs2distrc && extraoptions=3D`c # --log has optional argument TEMP=3D`getopt \ -o v:n:r:e:a:B:dhmbgol \ =2D--long log::,version:,name:,required-header:,required-header-error-messa= ge:,make-unpackaged,help,no-bz2,no-bzip2,no-gzip,only-directory,remove-hidd= en,admin-dir:,branch:,no-i18n,cvs-root:,debug \ +--long log::,version:,name:,required-header:,required-header-error-message= :,make-unpackaged,help,no-bz2,no-bzip2,no-gzip,only-directory,remove-hidden= ,admin-dir:,branch:,no-i18n,no-i18n-lang:,cvs-root:,debug \ -n cvs2dist -- $extraoptions "$@"` =20 if [ $? !=3D 0 ]; then @@ -37,6 +37,7 @@ eval set -- "$TEMP" log=3D"/dev/null" calclog=3D0 doi18n=3D"yes" +noi18nlang=3D"" cvsroot=3D"" debug=3D"" =20 @@ -54,6 +55,7 @@ while true; do --cvs-root) cvsroot=3D"$2"; shift 2 ;; -r|--required-header) requiredheader=3D$2; shift 2 ;; --no-i18n) doi18n=3D"no"; shift 1 ;; + --no-i18n-lang) noi18nlang=3D"$2"; shift 2 ;; -e|--required-header-error-message) requiredmsg=3D$2; shift 2 ;; -m|--make-unpackaged) leavedir=3D"non-empty"; shift 1 ;; -h|--help) showhelp=3D"non-empty"; shift 1 ;; @@ -116,6 +118,9 @@ if [ ! -z $showhelp ] || [ -z $module ]=20 echo " (symbolic links are OK.)" echo " -B --branch use branch for i18n checkouts." echo " --no-i18n don't try to automatically checkout the translations f= rom cvs." + echo " --no-i18n-lang exclude all languages in the given com= ma" + echo " seperated list. example:" + echo " --no-i18n-lang xx,de,en_GB" echo " --log=3D If logfile unspecified, default file is used." echo " (The '=3D' is essential and may not be ommited" echo " when specifying the logfile.)" @@ -296,7 +301,23 @@ if [ $doi18n =3D "yes" ]; then pushd $temp_dir echo "cvs co kde-i18n/subdirs" >> $log cvs -z4 -q -d "$cvsroot" co $branch -P kde-i18n/subdirs > /dev/null 2>= &1 =2D i18nlangs=3D"$(cat kde-i18n/subdirs)" + i18nlangs_tmp=3D"$(cat kde-i18n/subdirs)" + skiplist=3D"`echo $noi18nlang | sed -e 's/,/ /g'`" + if [ "$skiplist" ]; then + for lang in $i18nlangs_tmp; do + must_skip=3D"no" + for skip in $skiplist; do + if [ "$lang" =3D "$skip" ]; then + must_skip=3D"yes" + fi + done + if [ "$must_skip" =3D "no" ]; then + i18nlangs=3D"$i18nlangs $lang" + fi + done + else + i18nlangs=3D"$i18nlangs_tmp" + fi echo "available languages: $i18nlangs" >> $log popd fi --Boundary-01=_71eXBXSouNoN52d-- --nextPart4478733.Gb2u3OK0XS Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQBBXe2DFGK1OIvVOP4RAvyTAKCQJ2VzOGo87PtshZkfjPBDARJYmACgwIfc afnEwEO3sOr0mROPl3WOvuE= =mF7u -----END PGP SIGNATURE----- --nextPart4478733.Gb2u3OK0XS--