mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-16 04:36:02 +00:00
version: code optimization
git-svn-id: https://svn.fhem.de/fhem/trunk@10477 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
274d427566
commit
939a5a7ff1
@ -29,9 +29,8 @@ CommandVersion($$)
|
||||
next if(grep(/$mod_name/, @ret));
|
||||
Log 4, "Looking for SVN Id in module $mod_name";
|
||||
|
||||
if($max < length($mod_name)) {
|
||||
$max = length($mod_name)
|
||||
}
|
||||
$max = length($mod_name) if($max < length($mod_name))
|
||||
|
||||
my $line;
|
||||
|
||||
if(!open(FH, $fn)) {
|
||||
@ -53,10 +52,8 @@ CommandVersion($$)
|
||||
push @ret, $line;
|
||||
}
|
||||
|
||||
@ret = map {/\$Id\: (\S+) (\S+) (.+?) \$/ ? sprintf("%-".$max."s %5d %s",$1,$2,$3) : $_}
|
||||
@ret;
|
||||
@ret = grep {(defined($param) ? $_ =~ /$param/ : 1)} @ret;
|
||||
@ret = sort {version_sortModules($a, $b)} @ret;
|
||||
@ret = map {/\$Id\: (\S+) (\S+) (.+?) \$/ ? sprintf("%-".$max."s %5d %s",$1,$2,$3) : $_} @ret;
|
||||
@ret = sort {version_sortModules($a, $b)} grep {(defined($param) ? $_ =~ /$param/ : 1)} @ret;
|
||||
return "no loaded modules found that match: $param" if($param && !@ret);
|
||||
return sprintf("%-".$max."s %s","File","Rev Last Change\n\n").
|
||||
trim(join("\n", grep (($_ =~ /^fhem.pl|\d\d_/), @ret))."\n\n".
|
||||
|
Loading…
x
Reference in New Issue
Block a user