From 87a5ca02332641ab994c8db72250575584e3ef44 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Thu, 7 Jun 2012 13:59:44 +0000 Subject: [PATCH] New syntax + control file git-svn-id: https://svn.fhem.de/fhem/trunk@1605 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/contrib/fhemupdate.control | 1 + fhem/contrib/fhemupdate.pl | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 fhem/contrib/fhemupdate.control diff --git a/fhem/contrib/fhemupdate.control b/fhem/contrib/fhemupdate.control new file mode 100644 index 000000000..1575d5223 --- /dev/null +++ b/fhem/contrib/fhemupdate.control @@ -0,0 +1 @@ +MOV FHEM/*.gplot www/gplot diff --git a/fhem/contrib/fhemupdate.pl b/fhem/contrib/fhemupdate.pl index 3e9e6f32f..fa1697423 100755 --- a/fhem/contrib/fhemupdate.pl +++ b/fhem/contrib/fhemupdate.pl @@ -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 = ) { + print CTL $l; + } + close ADD; +} +close CTL; + if($cnt) { print "FTP Upload needed for $cnt files\n"; system("ftp -e fhem.de < script.txt");