/[cvs]/nfo/bash/synccvs
ViewVC logotype

Contents of /nfo/bash/synccvs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations)
Tue Jan 28 11:02:27 2003 UTC (21 years, 3 months ago) by root
Branch: MAIN
Changes since 1.2: +3 -1 lines
+ changed/fixed behaviour

1 #!/usr/bin/perl
2
3 use strict;
4 use warnings;
5
6 use lib qw( /data/libs/nfo/perl/libs );
7 use org::netfrag::shortcuts qw( run_cmd );
8
9 sub synccvs {
10 my $which = shift;
11 my $name = shift;
12 my $option = shift;
13
14 $which =~ m/^.*\/(.+?)$/;
15 $name ||= $1;
16
17 my $shellcmd;
18 my $cvscmd;
19 my $exists_name = "CVS";
20 $exists_name = "$name/$exists_name" if $name;
21 if (! -e $exists_name || ($option && $option eq 'checkout')) {
22 $cvscmd = 'checkout';
23 $shellcmd = "cvs -d /var/lib/cvs $cvscmd -d $name $which";
24 } else {
25 $cvscmd = 'update';
26 $shellcmd = "cvs -d /var/lib/cvs $cvscmd $name";
27 }
28 return if !$shellcmd;
29 #print "cmd: $shellcmd", "\n";
30 run_cmd($shellcmd);
31 }
32
33 synccvs(shift, shift, shift);
34
35 1;

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed