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