added corrected things

This commit is contained in:
Darii Nurgaleev
2020-10-13 21:39:12 +07:00
parent dcfa420873
commit 8786b3e436
+2 -2
View File
@@ -10,12 +10,12 @@ function Validate-Scripts {
$ScriptWithoutShebangLine = @() $ScriptWithoutShebangLine = @()
Get-ChildItem $path -Recurse -File -Filter "*.sh" | ForEach-Object { Get-ChildItem $path -Recurse -File -Filter "*.sh" | ForEach-Object {
$relativePath = Resolve-Path $_.FullName -Relative $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) { if ($shebangLine -eq $ExpectedShebang) {
Write-Host "[+] '$relativePath'" Write-Host "[+] '$relativePath'"
} }
else { else {
Write-Host "[-] 'relativePath'" Write-Host "[-] '$relativePath'"
$ScriptWithoutShebangLine += $relativePath $ScriptWithoutShebangLine += $relativePath
} }
} }