New syntax + control file
git-svn-id: https://svn.fhem.de/fhem/trunk@1605 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
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 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";
|
open FTP, ">script.txt" || die "Can't open script.txt: $!\n";
|
||||||
print FTP "cd fhem/fhemupdate2\n";
|
print FTP "cd fhem/fhemupdate2\n";
|
||||||
print FTP "put filetimes.txt\n";
|
print FTP "put filetimes.txt\n";
|
||||||
@@ -173,7 +174,7 @@ foreach my $f (sort keys %filetime2) {
|
|||||||
my $fn = $f;
|
my $fn = $f;
|
||||||
$fn =~ s/.txt$// if($fn =~ m/.pl.txt$/);
|
$fn =~ s/.txt$// if($fn =~ m/.pl.txt$/);
|
||||||
print FH "$filetime2{$f} $filesize2{$f} $fn\n";
|
print FH "$filetime2{$f} $filesize2{$f} $fn\n";
|
||||||
|
print CTL "UPD $filetime2{$f} $filesize2{$f} $fn\n";
|
||||||
my $newfname = $f;
|
my $newfname = $f;
|
||||||
if(!$oldtime{$f} || $oldtime{$f} ne $filetime2{$f}) {
|
if(!$oldtime{$f} || $oldtime{$f} ne $filetime2{$f}) {
|
||||||
$f =~ m,^(.*)/([^/]*)$,;
|
$f =~ m,^(.*)/([^/]*)$,;
|
||||||
@@ -187,6 +188,14 @@ foreach my $f (sort keys %filetime2) {
|
|||||||
close FH;
|
close FH;
|
||||||
close FTP;
|
close FTP;
|
||||||
|
|
||||||
|
if(open(ADD, "../contrib/fhemupdate.control")) {
|
||||||
|
while(my $l = <ADD>) {
|
||||||
|
print CTL $l;
|
||||||
|
}
|
||||||
|
close ADD;
|
||||||
|
}
|
||||||
|
close CTL;
|
||||||
|
|
||||||
if($cnt) {
|
if($cnt) {
|
||||||
print "FTP Upload needed for $cnt files\n";
|
print "FTP Upload needed for $cnt files\n";
|
||||||
system("ftp -e fhem.de < script.txt");
|
system("ftp -e fhem.de < script.txt");
|
||||||
|
|||||||
Reference in New Issue
Block a user