use strict;
use warnings;

my $templates_path = shift @ARGV;

my $update;
while (<>) {
    chomp;
    my($mode, $path) = split /\s+/;

    $update++ if $path =~ m!^websites/coderepos.org/trac/share/templates!;
}

exit 0 unless $update;

system '/usr/local/bin/svn', 'up', $templates_path;

exit 0;
