2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-19 12:46:03 +00:00

98_update.pm: call commandref_join.pl if exists (Forum #33916)

git-svn-id: https://svn.fhem.de/fhem/trunk@8060 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2015-02-21 21:06:28 +00:00
parent 242cc260d9
commit 809596d594

View File

@ -149,6 +149,14 @@ doUpdate($$)
$lh{$l[3]}{LEN} = $l[2];
}
my ($canJoin, $needJoin);
my $cj = "$root/contrib/commandref_join.pl";
if(-f $cj &&
-f "$root/docs/commandref_frame.html" &&
-w "$root/docs/commandref.html") {
$canJoin = 1;
}
my @excl = split(" ", AttrVal("global", "exclude_from_update", ""));
my @rl = upd_getChanges($root, $basePath);
@ -197,8 +205,12 @@ doUpdate($$)
uLog 1, "List of new / modified files since last update:"
if($arg eq "check" && $nChanged == 0);
uLog 1, "$r[0] $fName";
$nChanged++;
if($fName =~ m,docs/commandref(_..)?.html, && $canJoin) {
$needJoin = 1;
next;
}
uLog 1, "$r[0] $fName";
next if($arg eq "check");
my $remFile = upd_getUrl("$basePath/$fName");
@ -237,6 +249,13 @@ doUpdate($$)
"FHEM/$ctrlFileName", $remCtrlFile));
}
if($canJoin && $needJoin) {
chdir($root);
uLog(1, "Calling $^X $cj, this may take a while");
my $ret = `$^X $cj`;
uLog(1, $ret) if($ret);
}
uLog(1, "");
uLog 1,
'update finished, "shutdown restart" is needed to activate the changes.';