]> git.donarmstrong.com Git - debbugs.git/commitdiff
support bzip2 (oldstable)
authorDon Armstrong <don@donarmstrong.com>
Fri, 30 Dec 2016 00:13:49 +0000 (16:13 -0800)
committerDon Armstrong <don@donarmstrong.com>
Fri, 30 Dec 2016 00:13:49 +0000 (16:13 -0800)
examples/debian/versions/build-versions-db

index 8456bfe501fcdc308687f5ee3a95db0eb6e5e311..ab03eba9807cc481fe1aa77741d127d8a155a4ae 100755 (executable)
@@ -133,6 +133,10 @@ sub open_compressed_file {
        $mode = '-|:encoding(UTF-8)';
        push @opts,'xz','-dc';
     }
+    if ($file =~ /^\.bz2$/) {
+       $mode = '-|:encoding(UTF-8)';
+       push @opts,'bzip2','-dc';
+    }
     open($fh,$mode,@opts,$file);
     return $fh;
 }