Permalink
Browse files

brought over from html-tidy

  • Loading branch information...
1 parent cd24831 commit b2711fc08484c6f37ec691c6cbd88ab6e158c97f @petdance committed Feb 16, 2010
Showing with 41 additions and 0 deletions.
  1. +41 −0 tidysync
View
@@ -0,0 +1,41 @@
+#!/usr/bin/perl
+
+=pod
+
+This is not meant for human consumption. It's for Andy to sync up the
+libtidy CVS directory with the github libtidy copy of it.
+
+This expects that you have tidy checked out like so, in a parallel directory:
+
+ cvs -d:pserver:anonymous@tidy.cvs.sourceforge.net:/cvsroot/tidy login
+ cvs -z3 -d:pserver:anonymous@tidy.cvs.sourceforge.net:/cvsroot/tidy co -P modulename
+
+=cut
+
+use warnings;
+use strict;
+
+use File::Copy;
+use File::Find;
+use Perl6::Say;
+
+# This finagling assumes we're in html-tidy, and there's a ../tidy
+
+my @skipdirs = qw( CVS CVSROOT experimental test bin lib obj );
+my %skipdirs = map {($_,1)} @skipdirs;
+
+my $sourcedir = '../tidy';
+
+find( sub {
+ if ( -d ) {
+ $File::Find::prune = 1 if $skipdirs{$_};
+ return;
+ }
+
+ my $name = $File::Find::name;
+ $name =~ s{^\Q$sourcedir/}{} or die 'Bad filenaming going on';
+ my $source = "$sourcedir/$name";
+ my $target = "libtidy/$name";
+ say "cp -p $source $target";
+ #copy( $source, $target ) or die "Can't copy $source to $target: $!";
+ }, $sourcedir );

0 comments on commit b2711fc

Please sign in to comment.