@@ -16,7 +16,7 @@ $self = Split-Path -Leaf $MyInvocation.MyCommand.Path
1616$projectDirectory = Split-Path $MyInvocation.MyCommand.Path
1717$libgit2Directory = Join-Path $projectDirectory " libgit2"
1818
19- function Run -Command ([scriptblock ]$Command , [switch ]$Fatal , [switch ]$Quiet ) {
19+ function Invoke -Command ([scriptblock ]$Command , [switch ]$Fatal , [switch ]$Quiet ) {
2020 $output = " "
2121 if ($Quiet ) {
2222 $output = & $Command 2>&1
@@ -67,18 +67,18 @@ Push-Location $libgit2Directory
6767 $git = Find-Git
6868
6969 Write-Output " Fetching..."
70- Run - Command - Quiet { & $git fetch }
70+ Invoke -Command - Quiet { & $git fetch }
7171
7272 Write-Output " Verifying $sha ..."
7373 $sha = & $git rev- parse $sha
7474 if ($LASTEXITCODE -ne 0 ) {
7575 write-host - foregroundcolor red " Error: invalid SHA. USAGE: $self <SHA>"
76- popd
76+ Pop-Location
7777 break
7878 }
7979
8080 Write-Output " Checking out $sha ..."
81- Run - Command - Quiet - Fatal { & $git checkout $sha }
81+ Invoke -Command - Quiet - Fatal { & $git checkout $sha }
8282
8383 Pop-Location
8484
@@ -88,7 +88,7 @@ Push-Location $libgit2Directory
8888 $binaryFilename = " git2-" + $sha.Substring (0 , 7 )
8989 }
9090
91- sc - Encoding ASCII (Join-Path $projectDirectory " nuget.package\libgit2\libgit2_hash.txt" ) $sha
91+ Set-Content - Encoding ASCII (Join-Path $projectDirectory " nuget.package\libgit2\libgit2_hash.txt" ) $sha
9292
9393 $buildProperties = @"
9494<Project>
@@ -99,7 +99,7 @@ Push-Location $libgit2Directory
9999</Project>
100100"@
101101
102- sc - Encoding UTF8 (Join-Path $projectDirectory " nuget.package\build\LibGit2Sharp.NativeBinaries.props" ) $buildProperties
102+ Set-Content - Encoding UTF8 (Join-Path $projectDirectory " nuget.package\build\LibGit2Sharp.NativeBinaries.props" ) $buildProperties
103103
104104 $net40BuildProperties = @"
105105<Project>
@@ -140,7 +140,7 @@ Push-Location $libgit2Directory
140140</Project>
141141"@
142142
143- sc - Encoding UTF8 (Join-Path $projectDirectory " nuget.package\build\net40\LibGit2Sharp.NativeBinaries.props" ) $net40BuildProperties
143+ Set-Content - Encoding UTF8 (Join-Path $projectDirectory " nuget.package\build\net40\LibGit2Sharp.NativeBinaries.props" ) $net40BuildProperties
144144
145145 $dllConfig = @"
146146<configuration>
@@ -149,7 +149,7 @@ Push-Location $libgit2Directory
149149</configuration>
150150"@
151151
152- sc - Encoding UTF8 (Join-Path $projectDirectory " nuget.package\libgit2\LibGit2Sharp.dll.config" ) $dllConfig
152+ Set-Content - Encoding UTF8 (Join-Path $projectDirectory " nuget.package\libgit2\LibGit2Sharp.dll.config" ) $dllConfig
153153
154154 Write-Output " Done!"
155155}
0 commit comments