diff --git a/scripts/build.ps1 b/scripts/build.ps1 index 0253c3c..4d3c96b 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -35,7 +35,7 @@ .LINK http://cmder.app/ - Project Home #> -[CmdletBinding(SupportsShouldProcess=$true)] +[CmdletBinding(SupportsShouldProcess = $true)] Param( # CmdletBinding will give us; # -verbose switch to turn on logging and @@ -108,12 +108,14 @@ if (-Not $noVendor) { $ConEmuXmlSave = Join-Path $config "ConEmu.xml" Write-Verbose "Backup '$ConEmuXml' to '$ConEmuXmlSave'" Copy-Item $ConEmuXml $ConEmuXmlSave - } else { $ConEmuXml = "" } - } else { $ConEmuXml = "" } + } + else { $ConEmuXml = "" } + } + else { $ConEmuXml = "" } # Kill ssh-agent.exe if it is running from the $env:cmder_root we are building foreach ($ssh_agent in $(Get-Process ssh-agent -ErrorAction SilentlyContinue)) { - if ([string]$($ssh_agent.path) -Match [string]$cmder_root.replace('\','\\')) { + if ([string]$($ssh_agent.path) -Match [string]$cmder_root.replace('\', '\\')) { Write-Verbose $("Stopping " + $ssh_agent.path + "!") Stop-Process $ssh_agent.id } diff --git a/scripts/pack.ps1 b/scripts/pack.ps1 index 04ad54b..418fdcd 100644 --- a/scripts/pack.ps1 +++ b/scripts/pack.ps1 @@ -22,7 +22,7 @@ https://github.com/cmderdev/cmder - Project Home #> -[CmdletBinding(SupportsShouldProcess=$true)] +[CmdletBinding(SupportsShouldProcess = $true)] Param( # CmdletBinding will give us; # -verbose switch to turn on logging and @@ -42,8 +42,8 @@ $ErrorActionPreference = "Stop" Ensure-Executable "7z" $targets = @{ - "cmder.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on"; - "cmder.zip" = "-mm=Deflate -mfb=128 -mpass=3"; + "cmder.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on"; + "cmder.zip" = "-mm=Deflate -mfb=128 -mpass=3"; "cmder_mini.zip" = "-xr!`"vendor\git-for-windows`""; } @@ -63,7 +63,7 @@ $version = Get-VersionStr if ($PSCmdlet.MyInvocation.BoundParameters["Verbose"].IsPresent) { Write-Verbose "Packing Cmder $version in $saveTo..." - $excluded = (Get-Content -Path "$cmderRoot\packignore") -Split [System.Environment]::NewLine | Where-Object {$_} + $excluded = (Get-Content -Path "$cmderRoot\packignore") -Split [System.Environment]::NewLine | Where-Object { $_ } Get-ChildItem $cmderRoot -Force -Exclude $excluded } diff --git a/scripts/update.ps1 b/scripts/update.ps1 index 4d5d2b0..b7ac73c 100644 --- a/scripts/update.ps1 +++ b/scripts/update.ps1 @@ -25,7 +25,7 @@ .LINK http://cmder.app/ - Project Home #> -[CmdletBinding(SupportsShouldProcess=$true)] +[CmdletBinding(SupportsShouldProcess = $true)] Param( # CmdletBinding will give us; # -verbose switch to turn on logging and @@ -158,10 +158,10 @@ function Fetch-DownloadUrl { # Special case for archive downloads of repository if (($null -eq $downloadLinks) -Or (-Not $downloadLinks)) { - if ((($p | % {$_.Trim('/')}) -Contains "archive") -And $info[0].tag_name) { + if ((($p | % { $_.Trim('/') }) -Contains "archive") -And $info[0].tag_name) { for ($i = 0; $i -lt $p.Length; $i++) { if ($p[$i].Trim('/') -eq "archive") { - $p[$i+1] = $info[0].tag_name + ".zip" + $p[$i + 1] = $info[0].tag_name + ".zip" $downloadLinks = $url.Scheme + "://" + $url.Host + ($p -Join '') return $downloadLinks }