diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2009-10-30 02:23:23 +0000 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2009-10-30 02:23:23 +0000 |
commit | c486e64596db92a4319f48f27832fd7ff8cc639d (patch) | |
tree | 5bfc17e33c033121e24b492f5ca41ded5c42d7e5 /dist-tools/getstats.py | |
parent | 0461562f6326dfff4c6eedb18a5b831eb8475efe (diff) | |
download | fetchmail-c486e64596db92a4319f48f27832fd7ff8cc639d.tar.gz fetchmail-c486e64596db92a4319f48f27832fd7ff8cc639d.tar.bz2 fetchmail-c486e64596db92a4319f48f27832fd7ff8cc639d.zip |
Clean up dist-tools, remove or update.
svn path=/branches/BRANCH_6-3/; revision=5446
Diffstat (limited to 'dist-tools/getstats.py')
-rwxr-xr-x | dist-tools/getstats.py | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/dist-tools/getstats.py b/dist-tools/getstats.py index 9a396fa8..17fcab50 100755 --- a/dist-tools/getstats.py +++ b/dist-tools/getstats.py @@ -7,21 +7,22 @@ import commands, os, string, ftplib # Get version and date date = commands.getoutput("LC_TIME=C date -u") pid = os.getpid() -# this is a fast variant using the base of the current working directory -# (ignores uncommitted modifications) -if os.system("svn export -q -rBASE . /tmp/getstats.%d" % pid): +if True: + # this is a fast variant using the base of the current working directory + # (ignores uncommitted modifications) + cmd = "svn export -q -rBASE . /tmp/getstats.%d" % pid +else: + # this is a slower variant that may export the whole tree across + # the net + cmd = "svn export -rCOMMITTED . /tmp/getstats.%d" % pid + +if os.system(cmd): print "SVN FAILED" os.exit(1) -# this is a slower variant that may export the whole tree across the net -#os.system("svn export -rCOMMITTED . /tmp/getstats.%d" % pid) + ln = commands.getoutput("cat /tmp/getstats.%d/*.[chly] 2>/dev/null | wc -l" % pid) os.system("rm -rf /tmp/getstats.%d" % pid) -vers = commands.getoutput("sed -n -e '/AC_INIT/s/AC_INIT(\[.*\],\[\\(.*\\)\])/\\1/p' <configure.ac") +vers = commands.getoutput("sed -n -e '/AC_INIT/s/AC_INIT(\\[.\\+\\],\\[\\(.*\\)\\],.*)/\\1/p' <configure.ac") print "fetchmail-" + vers + " (" + date + "), " + string.strip(ln) + " lines:" -# Use local listsize command to grab list statistics -#friends = commands.getoutput("listsize friends").strip() -#announce = commands.getoutput("listsize announce").strip() -#print "There are %s people on fetchmail-friends and %s on fetchmail-announce."% (friends, announce) - -# getstats.py +# end of getstats.py |