Skip to content

Commit

Permalink
cvsimport: Added option '-p': pass options to cvsps
Browse files Browse the repository at this point in the history
           Added option '-x' to cvsps call
  • Loading branch information
Matthias Urlichs committed Jun 30, 2005
1 parent 4c24e08 commit 2be4fcc
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions git-cvsimport-script
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,19 @@ use POSIX qw(strftime dup2);
$SIG{'PIPE'}="IGNORE";
$ENV{'TZ'}="UTC";

our($opt_h,$opt_o,$opt_v,$opt_d);
our($opt_h,$opt_o,$opt_v,$opt_d,$opt_p);

sub usage() {
print STDERR <<END;
Usage: ${\basename $0} # fetch/update GIT from CVS
[ -o branch-for-HEAD ] [ -h ] [ -v ] [ -d CVSROOT ]
[ -p opts-for-cvsps ]
CVS_module [ GIT_repository ]
END
exit(1);
}

getopts("hqvo:d:") or usage();
getopts("hqvo:d:p:") or usage();
usage if $opt_h;

@ARGV == 1 or @ARGV == 2 or usage();
Expand Down Expand Up @@ -375,7 +376,9 @@ unless(-d $git_dir) {
my $pid = open(CVS,"-|");
die "Cannot fork: $!\n" unless defined $pid;
unless($pid) {
exec("cvsps","-A","--cvs-direct",$cvs_tree);
my @opt;
@opt = split(/,/,$opt_p) if defined $opt_p;
exec("cvsps",@opt,"-x","-A","--cvs-direct",$cvs_tree);
die "Could not start cvsps: $!\n";
}

Expand Down

0 comments on commit 2be4fcc

Please sign in to comment.