mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +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:
parent
242cc260d9
commit
809596d594
@ -149,6 +149,14 @@ doUpdate($$)
|
|||||||
$lh{$l[3]}{LEN} = $l[2];
|
$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 @excl = split(" ", AttrVal("global", "exclude_from_update", ""));
|
||||||
|
|
||||||
my @rl = upd_getChanges($root, $basePath);
|
my @rl = upd_getChanges($root, $basePath);
|
||||||
@ -197,8 +205,12 @@ doUpdate($$)
|
|||||||
|
|
||||||
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);
|
||||||
uLog 1, "$r[0] $fName";
|
|
||||||
$nChanged++;
|
$nChanged++;
|
||||||
|
if($fName =~ m,docs/commandref(_..)?.html, && $canJoin) {
|
||||||
|
$needJoin = 1;
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
uLog 1, "$r[0] $fName";
|
||||||
next if($arg eq "check");
|
next if($arg eq "check");
|
||||||
|
|
||||||
my $remFile = upd_getUrl("$basePath/$fName");
|
my $remFile = upd_getUrl("$basePath/$fName");
|
||||||
@ -237,6 +249,13 @@ doUpdate($$)
|
|||||||
"FHEM/$ctrlFileName", $remCtrlFile));
|
"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, "");
|
||||||
uLog 1,
|
uLog 1,
|
||||||
'update finished, "shutdown restart" is needed to activate the changes.';
|
'update finished, "shutdown restart" is needed to activate the changes.';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user