X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=bin%2FBackupPC_tarCreate;h=e784e0a15fc515fc44fdfc6efd52641dd7ab1258;hp=5548672808d6ad2b9e6fc1bd4cc89d7660ce38ea;hb=f6fbcc3682d2bc9e7dfdc26e95bd5fcdb359496d;hpb=16755c17628b28a58d75663d7541036344826961 diff --git a/bin/BackupPC_tarCreate b/bin/BackupPC_tarCreate index 5548672..e784e0a 100755 --- a/bin/BackupPC_tarCreate +++ b/bin/BackupPC_tarCreate @@ -1,4 +1,4 @@ -#!/bin/perl +#!/usr/bin/perl #============================================================= -*-perl-*- # # BackupPC_tarCreate: create a tar archive of an existing dump @@ -37,7 +37,7 @@ # Craig Barratt # # COPYRIGHT -# Copyright (C) 2001-2003 Craig Barratt +# Copyright (C) 2001-2007 Craig Barratt # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -55,7 +55,7 @@ # #======================================================================== # -# Version 3.0.0, released 28 Jan 2007. +# Version 3.2.0beta0, released 5 April 2009. # # See http://backuppc.sourceforge.net. # @@ -94,6 +94,8 @@ usage: $0 [options] files/directories... -w writeBufSz write buffer size (default 1048576 = 1MB) -e charset charset for encoding file names (default: value of \$Conf{ClientCharset} when backup was done) + -l just print a file listing; don't generate an archive + -L just print a detailed file listing; don't generate an archive EOF exit(1); } @@ -184,13 +186,15 @@ if ( $ShareName eq "*" ) { archiveWriteHardLinks($fh); } -# -# Finish with two null 512 byte headers, and then round out a full -# block. -# -my $data = "\0" x ($tar_header_length * 2); -TarWrite($fh, \$data); -TarWrite($fh, undef); +if ( !$opts{l} && !$opts{L} ) { + # + # Finish with two null 512 byte headers, and then round out a full + # block. + # + my $data = "\0" x ($tar_header_length * 2); + TarWrite($fh, \$data); + TarWrite($fh, undef); +} # # print out totals if requested