3 # Collect statistics on current release.
5 import commands, os, string, ftplib
8 date = commands.getoutput("LC_TIME=C date +'%Y-%m-%d'")
10 os.mkdir("/tmp/getstats.%d" % pid)
12 cmd = "git archive --format=tar HEAD | ( cd /tmp/getstats.%d && tar -xf -)" % pid
15 print "git-archive FAILED"
18 ln = commands.getoutput("cat /tmp/getstats.%d/*.[chly] 2>/dev/null | wc -l" % pid)
19 os.system("rm -rf /tmp/getstats.%d" % pid)
20 vers = commands.getoutput("sed -n -e '/AC_INIT/s/AC_INIT(\\[.\\+\\],\\[\\(.*\\)\\],.*)/\\1/p' <configure.ac")
21 print "fetchmail-" + vers + " (released " + date + ", " + string.strip(ln) + " LoC):"