* Fix man page synopses formatting.
+pristine-tar (0.4) UNRELEASED; urgency=low
+
+ * Allow the delta file to be read or written from stdio.
+ * Fix man page synopses formatting.
+
+ -- Joey Hess <joeyh@debian.org> Sat, 24 Nov 2007 16:36:57 -0500
+
pristine-tar (0.3) unstable; urgency=low
* pristine-tar sometimes got confused about tarballs that did not unpack
=head1 SYNOPSIS
B<pristine-gz> [-vdk] gengz delta file
+
B<pristine-gz> [-vdk] gendelta file.gz delta
=head1 DESCRIPTION
support is a gz file that has been produced by appending together multiple
gz files.
+If the delta filename is "-", pristine-gz reads or writes it to stdio.
+
=head1 OPTIONS
=over 4
my $file=shift;
my $tempdir=tempdir();
+
+ if ($delta eq "-") {
+ $delta="$tempdir/in";
+ open (OUT, ">", $delta) || die "$delta: $!";
+ while (<STDIN>) {
+ print OUT $_;
+ }
+ close OUT;
+ }
doit("tar", "xf", File::Spec->rel2abs($delta), "-C", $tempdir);
if (! -e "$tempdir/type") {
my $delta=shift;
my $tempdir=tempdir();
+
+ my $stdout=0;
+ if ($delta eq "-") {
+ $stdout=1;
+ $delta="$tempdir/out";
+ }
+
my @files=qw(version type params filename timestamp);
doit("cp", $gzfile, "$tempdir/test.gz");
close OUT;
doit("tar", "czf", $delta, "-C", $tempdir, @files);
+
+ if ($stdout) {
+ doit("cat", $delta);
+ }
}
Getopt::Long::Configure("bundling");
=head1 SYNOPSIS
B<pristine-tar> [-vdk] gentar delta tarball
+
B<pristine-tar> [-vdk] gendelta tarball delta
=head1 DESCRIPTION
pristine-tar supports compressed tarballs, calling out to pristine-gz(1)
to produce the pristine gzip files.
+If the delta filename is "-", pristine-tar reads or writes it to stdio.
+
=head1 OPTIONS
=over 4
my $tempdir=tempdir();
+ if ($delta eq "-") {
+ $delta="$tempdir/in";
+ open (OUT, ">", $delta) || die "$delta: $!";
+ while (<STDIN>) {
+ print OUT $_;
+ }
+ close OUT;
+ }
+
doit("tar", "xf", File::Spec->rel2abs($delta), "-C", $tempdir);
if (! -e "$tempdir/type") {
die "failed to gentar delta $delta\n";
my $delta=shift;
my $tempdir=tempdir();
+
+ my $stdout=0;
+ if ($delta eq "-") {
+ $stdout=1;
+ $delta="$tempdir/out";
+ }
+
my @files=qw(delta manifest version type);
# Check to see if it's compressed.
close OUT;
doit("tar", "czf", $delta, "-C", $tempdir, @files);
+
+ if ($stdout) {
+ doit("cat", $delta);
+ }
}
Getopt::Long::Configure("bundling");