mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-13 11:16:36 +00:00
New syntax + control file
git-svn-id: https://svn.fhem.de/fhem/trunk@1605 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
95e45d492a
commit
87a5ca0233
1
fhem/contrib/fhemupdate.control
Normal file
1
fhem/contrib/fhemupdate.control
Normal file
@ -0,0 +1 @@
|
||||
MOV FHEM/*.gplot www/gplot
|
@ -164,6 +164,7 @@ if(open FH, "filetimes.txt") {
|
||||
}
|
||||
|
||||
open FH, ">filetimes.txt" || die "Can't open filetimes.txt: $!\n";
|
||||
open CTL, ">controls.txt" || die "Can't open controls.txt: $!\n";
|
||||
open FTP, ">script.txt" || die "Can't open script.txt: $!\n";
|
||||
print FTP "cd fhem/fhemupdate2\n";
|
||||
print FTP "put filetimes.txt\n";
|
||||
@ -173,7 +174,7 @@ foreach my $f (sort keys %filetime2) {
|
||||
my $fn = $f;
|
||||
$fn =~ s/.txt$// if($fn =~ m/.pl.txt$/);
|
||||
print FH "$filetime2{$f} $filesize2{$f} $fn\n";
|
||||
|
||||
print CTL "UPD $filetime2{$f} $filesize2{$f} $fn\n";
|
||||
my $newfname = $f;
|
||||
if(!$oldtime{$f} || $oldtime{$f} ne $filetime2{$f}) {
|
||||
$f =~ m,^(.*)/([^/]*)$,;
|
||||
@ -187,6 +188,14 @@ foreach my $f (sort keys %filetime2) {
|
||||
close FH;
|
||||
close FTP;
|
||||
|
||||
if(open(ADD, "../contrib/fhemupdate.control")) {
|
||||
while(my $l = <ADD>) {
|
||||
print CTL $l;
|
||||
}
|
||||
close ADD;
|
||||
}
|
||||
close CTL;
|
||||
|
||||
if($cnt) {
|
||||
print "FTP Upload needed for $cnt files\n";
|
||||
system("ftp -e fhem.de < script.txt");
|
||||
|
Loading…
x
Reference in New Issue
Block a user