chiark / gitweb /
Provide compressed version of dictionaries
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sun, 5 Jul 2009 20:56:19 +0000 (21:56 +0100)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sun, 5 Jul 2009 20:56:19 +0000 (21:56 +0100)
pctb/dictionary-manager

index c504882..d9d3dab 100755 (executable)
@@ -1068,9 +1068,14 @@ proc remote-serv/take {yesno file dict} {
     manyset [dict2_reqkind_rows $dict] reqkind rows
     
     if {$yesno} {
-       read_database $dictdir/master-$dict.txt
+       set fnbase $dictdir/master-$dict.txt
+       read_database $fnbase
        set database($key) $val
        write_database
+
+       exec gzip -1 < $fnbase > $fnbase.gz.new
+       exec mv -f -- $fnbase.gz.new $fnbase.gz
+
        set desc approve
     } else {
        set desc reject