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

List:       kde-core-devel
Subject:    [PATCH] Scripty: find KAboutData quicker
From:       Nicolas Goutte <nicolasg () snafu ! de>
Date:       2004-10-01 14:18:52
Message-ID: 200410011618.06197.nicolasg () snafu ! de
[Download RAW message or body]

The attached patch is for kde-common/admin/cvs.sh

It tries to speed up the search for the string KAboutData:
- by using fgrep (fast grep) instead of the normal grep
- by using -q not to give output
- by using -s not to give error output
- by using directly the result of fgrep as test.

(The patch depends on GNU tools' behaviour but here compatibility is 
secondary, as the code is only for Scripty.)

Please commit it, as I have not enough Karma for the admin directory.

Have a nice day!



["cvs_sh_kaboutdata.diff" (text/x-diff)]

Index: cvs.sh
===================================================================
RCS file: /home/kde/kde-common/admin/cvs.sh,v
retrieving revision 1.138
diff -u -p -r1.138 cvs.sh
--- cvs.sh	27 Sep 2004 11:52:59 -0000	1.138
+++ cvs.sh	1 Oct 2004 14:13:29 -0000
@@ -554,7 +554,7 @@ for subdir in $dirs; do
 	    echo "$subdir has *.rc, *.ui or *.kcfg files, but not correct messages line"
 	fi
    fi
-   if test -n "`find . -name \*.c\* -o -name \*.h\* | xargs grep -s KAboutData \
2>/dev/null`"; then +   if find . -name \*.c\* -o -name \*.h\* | xargs fgrep -s -q \
KAboutData ; then  echo -e 'i18n("_: NAME OF TRANSLATORS\\n"\n"Your names")\ni18n("_: \
EMAIL OF TRANSLATORS\\n"\n"Your emails")' > _translatorinfo.cpp  else echo " " > \
_translatorinfo.cpp  fi



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

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