* Several improvements to restore: cancel now reports the correct
[BackupPC.git] / bin / BackupPC_zipCreate
index 4fa7f4a..c5fe37c 100755 (executable)
@@ -51,7 +51,7 @@
 #
 #========================================================================
 #
-# Version 1.6.0_CVS, released 10 Dec 2002.
+# Version 2.0.0beta3, released 1 Jun 2003.
 #
 # See http://backuppc.sourceforge.net.
 #
@@ -75,16 +75,15 @@ my $BinDir = $bpc->BinDir();
 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");
     exit(1);
 }
 
-if ( $opts{h} !~ /^([\w\.-]+)$/ ) {
+if ( $opts{h} !~ /^([\w\.\s-]+)$/ ) {
     print(STDERR "$0: bad host name '$opts{h}'\n");
     exit(1);
 }