mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2026-08-18 18:32:30 +02:00
Fix for power shell script
This commit is contained in:
@@ -1,12 +1,16 @@
|
|||||||
param([string]$dir = ".")
|
param(
|
||||||
|
[string]$dir = "."
|
||||||
|
)
|
||||||
|
|
||||||
$total = 0
|
$total = 0
|
||||||
|
|
||||||
Get-ChildItem $dir -Recurse -Include *.c, *.cpp, *.h -File | ForEach-Object {
|
Get-ChildItem -Path $dir -Recurse -File | Where-Object {
|
||||||
$lines = [System.IO.File]::ReadLines($_.FullName).Count
|
$_.Extension -in ".c", ".cpp", ".h"
|
||||||
|
} | ForEach-Object {
|
||||||
|
$lines = [System.Linq.Enumerable]::Count([System.IO.File]::ReadLines($_.FullName))
|
||||||
Write-Output "$($_.FullName) : $lines"
|
Write-Output "$($_.FullName) : $lines"
|
||||||
$total += $lines
|
$total += $lines
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Output "-----------------------"
|
Write-Output "-----------------------------"
|
||||||
Write-Output "Over all files: $total"
|
Write-Output "Over all files: $total"
|
||||||
Reference in New Issue
Block a user