[prev] [thread] [next] [lurker] [Date index for 2002/09/17]
Update of /cvsroot/siesta/siesta/bin In directory usw-pr-cvs1:/tmp/cvs-serv29750/bin Modified Files: run_perltidy Removed Files: .cvsignore Log Message: more perltidy fucking aboot. this time to avoid polluting lib/ Index: run_perltidy =================================================================== RCS file: /cvsroot/siesta/siesta/bin/run_perltidy,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- run_perltidy 17 Sep 2002 12:45:17 -0000 1.3 +++ run_perltidy 17 Sep 2002 15:31:44 -0000 1.4 @@ -1,6 +1,13 @@ -#!/bin/sh -for file in t/*.t bin/{nacho,tequila} `find lib -name \*.pm` ; do - echo tidying $file - test $file -nt $file.tdy && perltidy -lp -icp -nolq $file && cp $file.tdy $file && touch $file.tdy -done -true +#!/usr/bin/env perl +use strict; +use File::Find::Rule; + +mkdir 'tidy'; +for my $file (<t/*.t>, <bin/{nacho,tequila}>, find( name => '*.pm', in => 'lib')) { + (my $cached = $file) =~ s{/}{_}g; + $cached = "tidy/$cached"; + if ((stat $file)[9] > ((stat $cached)[9] || 0)) { + print "tidying $file\n"; + `perltidy -lp -icp -nolq $file -o $cached && cp $cached $file && touch $cached`; + } +} --- .cvsignore DELETED ---
Generated at 13:57 on 01 Jul 2004 by mariachi 0.52