# HG changeset patch # User Mark Doliner # Date 1190704109 0 # Node ID 8cffc806cd7e448fcc7b89f78a3896db5a56965d # Parent 4604cad304cb6f69b3763d1cf4be6db85eb41c47 Watch for CTRL+C when running stats.pl and exit, rather than making you hit CTRL+C a billion times diff -r 4604cad304cb -r 8cffc806cd7e po/stats.pl --- a/po/stats.pl Tue Sep 25 04:54:04 2007 +0000 +++ b/po/stats.pl Tue Sep 25 07:08:29 2007 +0000 @@ -63,6 +63,10 @@ $po = $pos[$index]; print STDERR "$po..." if($ARGV[0] eq '-v'); system("msgmerge $po.po $PACKAGE.pot -o $po.new 2>/dev/null"); + if (($? & 127) == 2) { + printf STDERR "Caught keyboard interrupt--exiting\n"; + exit + } $_ = `msgfmt --statistics $po.new -o /dev/null 2>&1`; chomp; if(/(\d+) translated message/) { $trans = $1; }