mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
fhem.pl: remove version, as it is a separate command (Forum #47155)
git-svn-id: https://svn.fhem.de/fhem/trunk@10462 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
6b7e480293
commit
38dfd4f6da
44
fhem/fhem.pl
44
fhem/fhem.pl
@ -153,7 +153,6 @@ sub CommandSetstate($$);
|
|||||||
sub CommandShutdown($$);
|
sub CommandShutdown($$);
|
||||||
sub CommandSleep($$);
|
sub CommandSleep($$);
|
||||||
sub CommandTrigger($$);
|
sub CommandTrigger($$);
|
||||||
sub CommandVersion($$);
|
|
||||||
|
|
||||||
# configDB special
|
# configDB special
|
||||||
sub cfgDB_Init;
|
sub cfgDB_Init;
|
||||||
@ -164,7 +163,6 @@ sub cfgDB_AttrRead($);
|
|||||||
sub cfgDB_ReadFile($);
|
sub cfgDB_ReadFile($);
|
||||||
sub cfgDB_UpdateFile($);
|
sub cfgDB_UpdateFile($);
|
||||||
sub cfgDB_WriteFile($@);
|
sub cfgDB_WriteFile($@);
|
||||||
sub cfgDB_svnId;
|
|
||||||
|
|
||||||
##################################################
|
##################################################
|
||||||
# Variables:
|
# Variables:
|
||||||
@ -228,12 +226,13 @@ use vars qw($featurelevel);
|
|||||||
use vars qw(@authorize); # List of authorization devices
|
use vars qw(@authorize); # List of authorization devices
|
||||||
use vars qw(@authenticate); # List of authentication devices
|
use vars qw(@authenticate); # List of authentication devices
|
||||||
use vars qw($auth_refresh);
|
use vars qw($auth_refresh);
|
||||||
|
use vars qw($cvsid); # used in 98_version.pm
|
||||||
|
$cvsid = '$Id$';
|
||||||
|
|
||||||
my $AttrList = "verbose:0,1,2,3,4,5 room group comment:textField-long alias ".
|
my $AttrList = "verbose:0,1,2,3,4,5 room group comment:textField-long alias ".
|
||||||
"eventMap userReadings:textField-long";
|
"eventMap userReadings:textField-long";
|
||||||
my $currcfgfile=""; # current config/include file
|
my $currcfgfile=""; # current config/include file
|
||||||
my $currlogfile; # logfile, without wildcards
|
my $currlogfile; # logfile, without wildcards
|
||||||
my $cvsid = '$Id$';
|
|
||||||
my $duplidx=0; # helper for the above pool
|
my $duplidx=0; # helper for the above pool
|
||||||
my $evalSpecials; # Used by EvalSpecials->AnalyzeCommand
|
my $evalSpecials; # Used by EvalSpecials->AnalyzeCommand
|
||||||
my $intAtCnt=0;
|
my $intAtCnt=0;
|
||||||
@ -378,8 +377,6 @@ $readingFnAttributes = "event-on-change-reading event-on-update-reading ".
|
|||||||
"[http://.../controlfile],update FHEM" },
|
"[http://.../controlfile],update FHEM" },
|
||||||
"updatefhem" => { ReplacedBy => "update" },
|
"updatefhem" => { ReplacedBy => "update" },
|
||||||
"usb" => { ModuleName => "autocreate" },
|
"usb" => { ModuleName => "autocreate" },
|
||||||
"version" => { Fn => "CommandVersion",
|
|
||||||
Hlp=>"[filter],print SVN version of loaded modules" },
|
|
||||||
);
|
);
|
||||||
|
|
||||||
###################################################
|
###################################################
|
||||||
@ -2750,43 +2747,6 @@ CommandSleep($$)
|
|||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
#####################################
|
|
||||||
sub
|
|
||||||
CommandVersion($$)
|
|
||||||
{
|
|
||||||
my ($cl, $param) = @_;
|
|
||||||
|
|
||||||
my @ret = ("# $cvsid");
|
|
||||||
push @ret, cfgDB_svnId if(configDBUsed());
|
|
||||||
my $max = 7 ; # length("fhem.pl") = 7
|
|
||||||
|
|
||||||
foreach my $m (sort {uc($a) cmp uc($b)} keys %modules) {
|
|
||||||
next if(!$modules{$m}{LOADED} ||
|
|
||||||
$modules{$m}{ORDER} < 0 ||
|
|
||||||
($param && $m !~ /$param/));
|
|
||||||
Log 4, "Looking for SVN Id in module $m";
|
|
||||||
my $fn = "$attr{global}{modpath}/FHEM/".$modules{$m}{ORDER}."_$m.pm";
|
|
||||||
if($max < length($modules{$m}{ORDER}."_$m.pm")) {
|
|
||||||
$max = length($modules{$m}{ORDER}."_$m.pm")
|
|
||||||
}
|
|
||||||
if(!open(FH, $fn)) {
|
|
||||||
my $ret = "$fn: $!";
|
|
||||||
if(configDBUsed()){
|
|
||||||
Log 4, "Looking for module $m in configDB to find SVN Id";
|
|
||||||
$ret = cfgDB_Fileversion($fn,$ret);
|
|
||||||
}
|
|
||||||
push @ret, $ret;
|
|
||||||
} else {
|
|
||||||
push @ret, grep(/\$Id. [^\$\n\r].+\$/, <FH>);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ret = map {/\$Id. (\S+) (\d+) (.+?)\$/ ? sprintf("%-".$max."s %5d %s",$1,$2,$3) : $_}
|
|
||||||
@ret;
|
|
||||||
|
|
||||||
return sprintf("%-".$max."s %s","File","Rev Last Change\n\n").
|
|
||||||
join("\n", grep((defined($param) ? ($_ =~ /$param/) : 1), @ret));
|
|
||||||
}
|
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# Return the time to the next event (or undef if there is none)
|
# Return the time to the next event (or undef if there is none)
|
||||||
# and call each function which was scheduled for this time
|
# and call each function which was scheduled for this time
|
||||||
|
Loading…
x
Reference in New Issue
Block a user