-#!/bin/perl -T
+#!/bin/perl
#============================================================= -*-perl-*-
#
# BackupPC_zipCreate: create a zip archive of an existing dump
#
#========================================================================
#
-# Version 2.0.0_CVS, released 3 Feb 2003.
+# Version 2.0.1, released 5 Oct 2003.
#
# See http://backuppc.sourceforge.net.
#
#========================================================================
use strict;
-use lib "/usr/local/BackupPC/lib";
+no utf8;
+use lib "/usr/local/BackupPC2.0.1/lib";
use Archive::Zip qw(:ERROR_CODES);
use File::Path;
use Getopt::Std;
my %Conf = $bpc->Conf();
my %opts;
-getopts("th:n:p:r:s:c:", \%opts);
-if ( @ARGV < 1 ) {
+if ( !getopts("th:n:p:r:s:c:", \%opts) || @ARGV < 1 ) {
print(STDERR "usage: $0 [-t] [-h host] [-n dumpNum] [-s shareName]"
. " [-r pathRemove] [-p pathAdd] [-c compressionLevel]"
. " files/directories...\n");
$fh->fdopen(fileno(STDOUT),"w");
my $zipfh = Archive::Zip->new();
+binmode(STDOUT);
foreach my $dir ( @ARGV ) {
archiveWrite($zipfh, $dir);
}