#!/usr/bin/perl # make_pretty.pl # Bryan Bishop 2008-10-01 # This script strips some of the stupid XML from the repository files. # (it's not my fault ((I swear)) opendir(DIR, "repo"); while (defined($file = readdir(DIR))) { # do something with "$dirname/$file" open(READER, "new_repo/$file"); $stopwriting = 0; foreach $line () { chomp($line); if(!($line eq "") && !($line eq "") && !($line eq "") && ($stopwriting == 0)) { print WRITER $line; print WRITER "\n"; } if($line =~ "") { $stopwriting = 1; } } close(WRITER); close(READER); } closedir(DIR);