File tree Expand file tree Collapse file tree 1 file changed +17
-12
lines changed Expand file tree Collapse file tree 1 file changed +17
-12
lines changed Original file line number Diff line number Diff line change @@ -14,21 +14,26 @@ use Digest::SHA ();
1414# # regenerate with: perl t/static-files.t --regen
1515
1616for my $arg (@ARGV ) {
17- if ($arg eq ' --regen' ) {
17+ if ( $arg eq ' --regen' ) {
1818 my %sha ;
1919
2020 require File::Find;
21- File::Find::find({
22- no_chdir => 1,
23- wanted => sub {
24- return
25- if -d ;
26- return
27- if m {\/\. } ;
21+ File::Find::find(
22+ {
23+ no_chdir => 1,
24+ wanted => sub {
25+ return
26+ if -d ;
27+ return
28+ if m {\/\. } ;
2829
29- $sha {$_ } = Digest::SHA-> new(' sha1' )-> addfile( $_ , ' b' )-> hexdigest;
30+ $sha {$_ } = Digest::SHA-> new(' sha1' )-> addfile( $_ , ' b' )
31+ -> hexdigest;
32+ },
3033 },
31- }, ' root/static/icons' , ' root/static/images' );
34+ ' root/static/icons' ,
35+ ' root/static/images'
36+ );
3237
3338 my $script = $0 ;
3439 $script = " ./$script "
@@ -37,9 +42,9 @@ for my $arg (@ARGV) {
3742 open my $fh , ' +<' , $script
3843 or die ;
3944
40- while (my $line = <$fh >) {
45+ while ( my $line = <$fh > ) {
4146 chomp $line ;
42- if ($line eq ' __DATA__' ) {
47+ if ( $line eq ' __DATA__' ) {
4348 truncate $fh , tell $fh ;
4449 for my $file ( sort keys %sha ) {
4550 print $fh " $sha {$file } $file \n " ;
You can’t perform that action at this time.
0 commit comments