diff --git a/controls_Weather.txt b/controls_Weather.txt index 00e0865..05d208a 100644 --- a/controls_Weather.txt +++ b/controls_Weather.txt @@ -1,4 +1,4 @@ -UPD 2025-02-04_21:25:55 25899 FHEM/59_Weather.pm +UPD 2025-02-05_05:56:41 25899 FHEM/59_Weather.pm UPD 2025-02-04_21:08:26 34419 lib/FHEM/Core/Weather.pm -UPD 2025-02-04_21:08:26 33780 lib/FHEM/APIs/Weather/OpenWeatherMapAPI.pm +UPD 2025-02-05_06:38:34 33780 lib/FHEM/APIs/Weather/OpenWeatherMapAPI.pm UPD 2025-02-04_21:08:26 38751 lib/FHEM/APIs/Weather/wundergroundAPI.pm diff --git a/hooks/pre-commit b/hooks/pre-commit index 733d777..a330cfb 100755 --- a/hooks/pre-commit +++ b/hooks/pre-commit @@ -4,33 +4,34 @@ use File::Basename; use POSIX qw(strftime); use strict; -my @filenames = ( 'FHEM/59_Weather.pm', - 'lib/FHEM/Core/Weather.pm', - 'lib/FHEM/APIs/Weather/DarkSkyAPI.pm', - 'lib/FHEM/APIs/Weather/OpenWeatherMapAPI.pm', - 'lib/FHEM/APIs/Weather/wundergroundAPI.pm', - ); +my @filenames = ( + 'FHEM/59_Weather.pm', + 'lib/FHEM/Core/Weather.pm', + 'lib/FHEM/APIs/Weather/OpenWeatherMapAPI.pm', + 'lib/FHEM/APIs/Weather/wundergroundAPI.pm', +); -my $controlsfile = 'controls_Weather.txt'; +my $controlsfile = 'controls_Weather.txt'; -open(FH, ">$controlsfile") || return("Can't open $controlsfile: $!"); +open( FH, ">$controlsfile" ) || return ("Can't open $controlsfile: $!"); -for my $filename (@filenames) { +for my $filename (@filenames) { my @statOutput = stat($filename); - - if (scalar @statOutput != 13) { - printf 'error: stat has unexpected return value for ' . $filename . "\n"; + + if ( scalar @statOutput != 13 ) { + printf 'error: stat has unexpected return value for ' + . $filename . "\n"; next; } - my $mtime = $statOutput[9]; - my $date = POSIX::strftime("%Y-%m-%d", localtime($mtime)); - my $time = POSIX::strftime("%H:%M:%S", localtime($mtime)); - my $filetime = $date."_".$time; + my $mtime = $statOutput[9]; + my $date = POSIX::strftime( "%Y-%m-%d", localtime($mtime) ); + my $time = POSIX::strftime( "%H:%M:%S", localtime($mtime) ); + my $filetime = $date . "_" . $time; my $filesize = $statOutput[7]; - printf FH 'UPD ' . $filetime . ' ' . $filesize . ' ' .$filename . "\n"; + printf FH 'UPD ' . $filetime . ' ' . $filesize . ' ' . $filename . "\n"; } close(FH);