Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: /svnutils/branches/dvl-sunny/src/

svnutils
Discussion topic

Back to topic list

CVS update: /svnutils/branches/dvl-sunny/src/

Author sunny
Full name Øyvind A. Holm
Date 2004-05-24 22:01:03 PDT
Message User: sunny
Date: 04/05/24 22:01:03

Added:
 /svnutils/branches/d​vl-sunny/src/
  svnbck

Log:
 r26 | sunny | 2004-05-25 06:59:39 +0200 (Tue, 25 May 2004) | 7 lines
 Changed paths:
    A /branches/dvl-sunny/src/svnbck
 
 Backup program in Perl for automatic backups of the repositories. Not
 finished yet.
 
 AM src/svnbck
 
 Last modified 2004-05-25T00:03:06Z.

File Changes:

Directory: /svnutils/branches/d​vl-sunny/src/
====================​====================​====

File [added]: svnbck
Url: http://svnutils.tigr​is.org/source/browse​/svnutils/branches/d​vl-sunny/src/svnbck?​rev=1.1&content-​type=text/vnd.viewcv​s-markup
Added lines: 82
---------------
#!/usr/bin/perl -w

#===================​====================​====================​====
# $Id: svnbck 26 2004-05-25 04:59:39Z sunny $
# Backup of active Subversion repositories
#
# Character set: UTF-8
# License: GNU General Public License ♥
# ©opyleft 2004 Øyvind A. Holm <sunny at sunbase dot org>
#===================​====================​====================​====

use strict;
use Env qw{HOME};

$| = 1;

my $Simulate = 1;

my $prog_name = $0;
$prog_name =~ s/\/(.*?)$/$1/;
my $svn_Id = '$Id: svnbck 26 2004-05-25 04:59:39Z sunny $';
$svn_Id =~ s/^\$Id: (.*) \$/$1/;
my ($rev_nr, $rev_date) =
   ("", "" );
if ($svn_Id =~ /^(\S+) (\d+) (\S+ \S+)/) {
    $rev_nr = $2;
    $rev_date = $3;
}

print("$prog_name r$rev_nr ($rev_date)\n");
exit;

defined($HOME) || die("$prog_name: The HOME environment variable is not defined. Aborting...\n");

my $config_file = "$HOME/.backupsvnrc";
my $reposconf_found = 0;

if (open(ConfigFP, "<$config_file")) {
    while (<ConfigFP>) {
        if (/^[repositories]/) {
            $reposconf_found = 1;
        } else {
        }
    }
} else {
    die("$prog_name: $config_file: Unable to open configuration file for read\n");
}

-e "/sunba.mrk" || die("Saken må kjøres på sunba.");

my $rcs_id = '$Id: svnbck 26 2004-05-25 04:59:39Z sunny $';
$rcs_id =~ s/\$Id: (.*) \$/$1/;

=pod

=head1 Plan for opplegget

cd ~/Svn
glob alle filene i ~/Svn

for (@glob_array) {
    my $Curr = $_;

    mysystem("svnadmin
}


=cut

sub mysystem {
    chomp(my $Cmd = shift);
    if ($Simulate) {
        print("Simulating \"$Cmd\"\n");
    } else {
        print("Executing \"$Cmd\"\n");
        # system($Cmd);
    }
}
__END__

# vim: set fileencoding=UTF-8 filetype=perl foldmethod=marker foldlevel=0 :
# End of file $Id: svnbck 26 2004-05-25 04:59:39Z sunny $




--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: cvs-unsubscribe@svnu​tils.tigris.org
For additional commands, e-mail: cvs-help at svnutils dot tigris dot org

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

CVS update: /svnutils/branches/dvl-sunny/src/ sunny Øyvind A. Holm 2004-05-24 22:01:03 PDT
Messages per page: