--- nfo/bash/synccvs 2003/01/28 11:02:27 1.3 +++ nfo/bash/synccvs 2004/11/07 02:36:33 1.4 @@ -1,10 +1,13 @@ #!/usr/bin/perl +# synccvs - checkout / update from cvs made easy +# $Id: synccvs,v 1.4 2004/11/07 02:36:33 bd Exp $ + use strict; use warnings; -use lib qw( /data/libs/nfo/perl/libs ); -use org::netfrag::shortcuts qw( run_cmd ); +my $cvs = '/usr/bin/cvs -q'; +my $CVSROOT = '/var/lib/cvs'; sub synccvs { my $which = shift; @@ -20,14 +23,14 @@ $exists_name = "$name/$exists_name" if $name; if (! -e $exists_name || ($option && $option eq 'checkout')) { $cvscmd = 'checkout'; - $shellcmd = "cvs -d /var/lib/cvs $cvscmd -d $name $which"; + $shellcmd = "$cvs -d $CVSROOT $cvscmd -d $name $which"; } else { $cvscmd = 'update'; - $shellcmd = "cvs -d /var/lib/cvs $cvscmd $name"; + $shellcmd = "$cvs -d $CVSROOT $cvscmd -d $name"; } return if !$shellcmd; #print "cmd: $shellcmd", "\n"; - run_cmd($shellcmd); + system($shellcmd); } synccvs(shift, shift, shift);