#!/usr/bin/perl require 5.004; use strict; use lib '../../adiary/lib'; use Satsuki::Base; #------------------------------------------------------------------------------ my $check_dir = 'hatena/'; my $r = Satsuki::Base->new(); my $themes = $r->search_files($check_dir, undef, 1); my $last_modified_tm; #------------------------------------------------------------------------------ # 確認作業 #------------------------------------------------------------------------------ my @themes = sort @$themes; my @errors; foreach my $theme (@themes) { my $dir = $check_dir . $theme . '/'; if (!-d $dir) { next; } # README 読み出し my $readme_file = $dir . 'README'; my $lines = $r->fread_lines($readme_file); my $gpl; foreach(@$lines) { if ($_ =~ /GPL/) { $gpl = $_; chomp($gpl) } } # ok? if ($gpl) { print "$dir $gpl\n"; } else { push(@errors, $dir); print "$dir Error!!\n"; } } if (@errors) { print "\nError themes\n"; foreach(@errors) { print "\t$_\n"; } }