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

Diff of /nfo/bash/synccvs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by root, Tue Jan 28 11:02:27 2003 UTC revision 1.4 by bd, Sun Nov 7 02:36:33 2004 UTC
# Line 1  Line 1 
1  #!/usr/bin/perl  #!/usr/bin/perl
2    
3    # synccvs - checkout / update from cvs made easy
4    # $Id$
5    
6  use strict;  use strict;
7  use warnings;  use warnings;
8    
9  use lib qw( /data/libs/nfo/perl/libs );  my $cvs = '/usr/bin/cvs -q';
10  use org::netfrag::shortcuts qw( run_cmd );  my $CVSROOT = '/var/lib/cvs';
11    
12  sub synccvs {  sub synccvs {
13    my $which = shift;    my $which = shift;
# Line 20  sub synccvs { Line 23  sub synccvs {
23    $exists_name = "$name/$exists_name" if $name;    $exists_name = "$name/$exists_name" if $name;
24    if (! -e $exists_name || ($option && $option eq 'checkout')) {    if (! -e $exists_name || ($option && $option eq 'checkout')) {
25      $cvscmd = 'checkout';      $cvscmd = 'checkout';
26      $shellcmd = "cvs -d /var/lib/cvs $cvscmd -d $name $which";      $shellcmd = "$cvs -d $CVSROOT $cvscmd -d $name $which";
27    } else {    } else {
28      $cvscmd = 'update';      $cvscmd = 'update';
29      $shellcmd = "cvs -d /var/lib/cvs $cvscmd $name";      $shellcmd = "$cvs -d $CVSROOT $cvscmd -d $name";
30    }    }
31    return if !$shellcmd;    return if !$shellcmd;
32    #print "cmd: $shellcmd", "\n";    #print "cmd: $shellcmd", "\n";
33    run_cmd($shellcmd);    system($shellcmd);
34  }  }
35    
36  synccvs(shift, shift, shift);  synccvs(shift, shift, shift);

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

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