diff --git a/46_TeslaPowerwall2AC.pm b/FHEM/46_TeslaPowerwall2AC.pm similarity index 100% rename from 46_TeslaPowerwall2AC.pm rename to FHEM/46_TeslaPowerwall2AC.pm diff --git a/controls_TeslaPowerwall2AC.txt b/controls_TeslaPowerwall2AC.txt index e69de29..dd4b8ff 100644 --- a/controls_TeslaPowerwall2AC.txt +++ b/controls_TeslaPowerwall2AC.txt @@ -0,0 +1 @@ +UPD 2021-02-27_04:38:01 26844 FHEM/46_TeslaPowerwall2AC.pm diff --git a/hooks/pre-commit b/hooks/pre-commit index 6baad04..5ae86ea 100755 --- a/hooks/pre-commit +++ b/hooks/pre-commit @@ -4,15 +4,15 @@ use File::Basename; use POSIX qw(strftime); use strict; -my @filenames = ('FHEM/46_TeslaPowerwall2AC.pm',); +my @filenames = ('FHEM/46_TeslaPowerwall2AC.pm'); -my $controlsfile = 'controls_TeslaPowerwall2AC.txt'; +my $controlsfile = 'controls_TeslaPowerwall2AC.txt'; open(FH, ">$controlsfile") || return("Can't open $controlsfile: $!"); for my $filename (@filenames) { my @statOutput = stat($filename); - + if (scalar @statOutput != 13) { printf 'error: stat has unexpected return value for ' . $filename . "\n"; next;