# HG changeset patch # User Igor Chubin # Date 1271783719 -14400 # Node ID 416394a87d9f93e0e1da87fceabbbaace37d3015 # Parent 7e3a52db54adfd165c330be3f3e2dfa9b611e052 minifix diff -r 7e3a52db54ad -r 416394a87d9f INSTALL.sh --- a/INSTALL.sh Mon Apr 05 21:34:55 2010 +0300 +++ b/INSTALL.sh Tue Apr 20 21:15:19 2010 +0400 @@ -1,6 +1,6 @@ #!/bin/sh -if [ "$UID" == 0 ] +if [ "$UID" = 0 ] then DEST=/usr/local/bin/ else diff -r 7e3a52db54ad -r 416394a87d9f grep-sentences.pl --- a/grep-sentences.pl Mon Apr 05 21:34:55 2010 +0300 +++ b/grep-sentences.pl Tue Apr 20 21:15:19 2010 +0400 @@ -10,7 +10,7 @@ $text =~ s@http://[a-zA-Z&_.:/0-9%?=,\#+()\[\]~-]*@@g; $text =~ s@\n@@g; $text =~ s@(Mr|Mrs)\.@\1POINT@g; - @sentences=split /\./, $text; + @sentences=split /[.!?]/, $text; for (@sentences) { s@(Mr|Mrs)POINT@\1.@g; s/^\s*//; diff -r 7e3a52db54ad -r 416394a87d9f new-words.sh --- a/new-words.sh Mon Apr 05 21:34:55 2010 +0300 +++ b/new-words.sh Tue Apr 20 21:15:19 2010 +0400 @@ -95,13 +95,15 @@ my $total_known=shift(@ARGV); my $s=0; my $mark_line=int($total_known*100/$total/5)*5; -if ($mark_line>=90) { $mark_line+=1; } else { $mark_line +=5; }; +if ($mark_line>=90) { + $mark_line=int($total_known*100/$total)+1; +} else { $mark_line +=5; }; while(<>) { print; /^\s*([0-9]*)\s*/; $s+=$1; - if (int(($total_known+$s)*100/$total)>=$mark_line) { + if (($total_known+$s)*100/$total>=$mark_line) { print "# $mark_line\n"; if ($mark_line>=90) { $mark_line+=1; } else { $mark_line +=5; }; }