For checkouts or to view logs direct your SVN client to svn://svn.saintamh.org/code/mapedit/backup.cgi

#!/usr/bin/perl -Tw
use warnings;
use strict;
$|++;

# file: backup.cgi

# Herve Saint-Amand
# Edinburgh
# 2011-11-01

#------------------------------------------------------------------------------
# includes

use lib '/home/herve/www/inc/perl';
use login;

use lib 'lib';
use Saintamh::Files qw/&read/;

#------------------------------------------------------------------------------

my ($domain) = &read ('.domain');
&login::force_login ($domain);

print "Content-Type: application/x-gzip\n\n";

$ENV{PATH} = '/bin:/usr/bin';

my @files;
m!^(dat/[\w\-\.]+\.json(?:\.gz))$! and push @files, $1
    for (<dat/*.*>);
 
exec ('tar', 'cz', @files);

#------------------------------------------------------------------------------