X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=makeDist;h=2e9e8841130e13aa6b0909a885ff3e48a7d46b95;hp=28071a2c225e2e95ddd414c13e5525332f957631;hb=fb14ecbce30175cec1dc6942dbb281ea8efac345;hpb=5b79f9a3c01bca16dd4d211e76fc53daa549e421 diff --git a/makeDist b/makeDist index 28071a2..2e9e884 100755 --- a/makeDist +++ b/makeDist @@ -14,7 +14,7 @@ # # Often the language files are not up to date, and makeDist # exits after complaining about the lang files being inconsistent. -# Use the -l option to turn off that behavior. +# Use the -nolangCheck option to turn off that behavior. # # AUTHOR # Craig Barratt @@ -37,12 +37,13 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # #======================================================================== -# use strict; use File::Path; use File::Copy; -use Getopt::Std; +use Getopt::Long; +use Data::Dumper; + use lib "./lib"; use BackupPC::Lib; use BackupPC::Config::Meta qw(:all); @@ -53,10 +54,6 @@ die("BackupPC::Lib->new failed\n") umask(0022); -my $Version = "3.2.0"; -my $ReleaseDate = "31 Dec 2008"; -my $DistDir = "dist/BackupPC-$Version"; - my @PerlSrc = qw( bin/BackupPC bin/BackupPC_archive @@ -74,7 +71,6 @@ my @PerlSrc = qw( bin/BackupPC_tarExtract bin/BackupPC_tarCreate bin/BackupPC_tarPCCopy - bin/BackupPC_compressPool bin/BackupPC_zipCreate bin/BackupPC_zcat lib/BackupPC/Attrib.pm @@ -119,7 +115,6 @@ my @PerlSrc = qw( lib/BackupPC/Storage/Text.pm lib/BackupPC/Xfer.pm lib/BackupPC/Xfer/Archive.pm - lib/BackupPC/Xfer/BackupPCd.pm lib/BackupPC/Xfer/Ftp.pm lib/BackupPC/Xfer/Protocol.pm lib/BackupPC/Xfer/Rsync.pm @@ -134,11 +129,32 @@ my @PerlSrc = qw( ); my %opts; -if ( !getopts("l", \%opts) || @ARGV != 0 ) { - print("usage: $0 [-l]\n"); +$opts{langCheck} = 1; +$opts{syntaxCheck} = 1; +if ( !GetOptions( + \%opts, + "langCheck!", + "syntaxCheck!", + "version=s", + "releasedate=s", + ) || @ARGV != 0 + || !defined($opts{version}) + ) { + print STDERR <{BlackoutHourEnd} = 2; $ConfVars->{BlackoutWeekDays} = 2; $ConfVars->{RsyncLogLevel} = 2; -system("perl -Ilib -c conf/config.pl >& /dev/null") - && die("$0: conf/config.pl contains a syntax error\n"); +if ( $opts{syntaxCheck} ) { + system("perl -Ilib -c conf/config.pl >& /dev/null") + && die("$0: conf/config.pl contains a syntax error (or someone killed me)\n"); +} foreach my $file ( @PerlSrc ) { - system("perl -Ilib -c $file >& /dev/null") - && die("$0: $file contains a syntax error\n"); + if ( $opts{syntaxCheck} ) { + system("perl -Ilib -c $file >& /dev/null") + && die("$0: $file contains a syntax error (or someone killed me)\n"); + } + # + # Skip checking of bundled libraries not explicitly part of + # BackupPC + # + next if ( $file =~ m/lib\/Net\/FTP/ ); $errCnt += CheckConfigParams($file, $ConfVars, 1); } -if ( !$opts{l} ) { +if ( !$opts{langCheck} ) { $errCnt += CheckLangUsage(); $errCnt += CheckLangTags(); } @@ -241,6 +266,7 @@ foreach my $file ( (@PerlSrc, init.d/README init.d/src/debian-backuppc init.d/src/freebsd-backuppc + init.d/src/freebsd-backuppc2 init.d/src/gentoo-backuppc init.d/src/gentoo-backuppc.conf init.d/src/linux-backuppc