mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-21 01:46:08 +00:00
98_update.pm: updateNoFileCHeck attribute added (Forum #37118)
git-svn-id: https://svn.fhem.de/fhem/trunk@8574 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
35e59ecb69
commit
adf536f1e5
@ -160,6 +160,7 @@ doUpdate($$)
|
|||||||
}
|
}
|
||||||
|
|
||||||
my @excl = split(" ", AttrVal("global", "exclude_from_update", ""));
|
my @excl = split(" ", AttrVal("global", "exclude_from_update", ""));
|
||||||
|
my $noSzCheck = AttrVal("global", "updateNoFileCheck", configDBUsed());
|
||||||
|
|
||||||
my @rl = upd_getChanges($root, $basePath);
|
my @rl = upd_getChanges($root, $basePath);
|
||||||
###########################
|
###########################
|
||||||
@ -211,17 +212,23 @@ doUpdate($$)
|
|||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $sz = -s $fPath;
|
if($noSzCheck) {
|
||||||
next if($isExcl || ($fileOk && defined($sz) && $sz eq $r[2]));
|
next if($isExcl || $fileOk);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
my $sz = -s $fPath;
|
||||||
|
next if($isExcl || ($fileOk && defined($sz) && $sz eq $r[2]));
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$needJoin = 1 if($fName =~ m/commandref_frame/ || $fName =~ m/\d+.*.pm/);
|
||||||
|
next if($fName =~ m/commandref.*html/ && $fName !~ m/frame/ && $canJoin);
|
||||||
|
|
||||||
uLog 1, "List of new / modified files since last update:"
|
uLog 1, "List of new / modified files since last update:"
|
||||||
if($arg eq "check" && $nChanged == 0);
|
if($arg eq "check" && $nChanged == 0);
|
||||||
|
|
||||||
$needJoin = 1 if($fName =~ m/commandref_frame/ || $fName =~ m/\d+.*.pm/);
|
|
||||||
next if($fName =~ m/commandref.*html/ && $fName !~ m/frame/ && $canJoin);
|
|
||||||
$nChanged++;
|
$nChanged++;
|
||||||
|
|
||||||
uLog 1, "$r[0] $fName";
|
uLog 1, "$r[0] $fName";
|
||||||
next if($arg eq "check");
|
next if($arg eq "check");
|
||||||
|
|
||||||
@ -526,6 +533,13 @@ upd_initRestoreDirs($)
|
|||||||
Monitor.
|
Monitor.
|
||||||
</li><br>
|
</li><br>
|
||||||
|
|
||||||
|
<a name="updateNoFileCheck"></a>
|
||||||
|
<li>updateNoFileCheck<br>
|
||||||
|
If set, the command won't compare the local file size with the expected
|
||||||
|
size. This attribute was introduced to satisfy some experienced FHEM
|
||||||
|
user, its default value is 0.
|
||||||
|
</li><br>
|
||||||
|
|
||||||
<a name="backup_before_update"></a>
|
<a name="backup_before_update"></a>
|
||||||
<li>backup_before_update<br>
|
<li>backup_before_update<br>
|
||||||
If this attribute is set, an update will back up your complete
|
If this attribute is set, an update will back up your complete
|
||||||
@ -615,6 +629,14 @@ upd_initRestoreDirs($)
|
|||||||
das Event Monitor aktiviert.
|
das Event Monitor aktiviert.
|
||||||
</li><br>
|
</li><br>
|
||||||
|
|
||||||
|
<a name="updateNoFileCheck"></a>
|
||||||
|
<li>updateNoFileCheck<br>
|
||||||
|
Wenn dieses Attribut gesetzt ist, wird die Größe der bereits
|
||||||
|
vorhandenen, lokalen Datei nicht mit der Sollgröße
|
||||||
|
verglichen. Dieses Attribut wurde nach nicht genau spezifizierten Wnsch
|
||||||
|
erfahrener FHEM Benutzer eingefuehrt, die Voreinstellung ist 0.
|
||||||
|
</li><br>
|
||||||
|
|
||||||
<a name="backup_before_update"></a>
|
<a name="backup_before_update"></a>
|
||||||
<li>backup_before_update<br>
|
<li>backup_before_update<br>
|
||||||
Wenn dieses Attribut gesetzt ist, erstellt FHEM eine Sicherheitskopie
|
Wenn dieses Attribut gesetzt ist, erstellt FHEM eine Sicherheitskopie
|
||||||
|
@ -284,6 +284,7 @@ my @globalAttrList = qw(
|
|||||||
title
|
title
|
||||||
uniqueID
|
uniqueID
|
||||||
updateInBackground:1,0
|
updateInBackground:1,0
|
||||||
|
updateNoFileCheck:1,0
|
||||||
version
|
version
|
||||||
);
|
);
|
||||||
use warnings 'qw';
|
use warnings 'qw';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user