added corrected things

This commit is contained in:
Darii Nurgaleev
2020-10-13 21:39:12 +07:00
parent dcfa420873
commit 8786b3e436

View File

@@ -10,12 +10,12 @@ function Validate-Scripts {
$ScriptWithoutShebangLine = @()
Get-ChildItem $path -Recurse -File -Filter "*.sh" | ForEach-Object {
$relativePath = Resolve-Path $_.FullName -Relative
$shebangLine = Get-Content -Path $.FullName | Select-Object -First 1
$shebangLine = Get-Content -Path $_.FullName | Select-Object -First 1
if ($shebangLine -eq $ExpectedShebang) {
Write-Host "[+] '$relativePath'"
}
else {
Write-Host "[-] 'relativePath'"
Write-Host "[-] '$relativePath'"
$ScriptWithoutShebangLine += $relativePath
}
}