more cr changes
This commit is contained in:
Родитель
89f9a54eca
Коммит
c1684a7a4e
|
@ -384,10 +384,10 @@ function ExtractAllFromTarGz(
|
|||
return
|
||||
}
|
||||
|
||||
$app = CallGetCommand -application "git.exe"
|
||||
$app = CallGetCommand -application git.exe
|
||||
|
||||
if ($app) {
|
||||
throw "Unpacking the file [$targzFileName] requires extraction utility TAR.EXE.\n Make sure GIT is installed on your maschine."
|
||||
throw "Unpacking the file [$targzFileName] requires extraction utility TAR.EXE.\n Make sure `"Git for Windows`" is installed on your machine."
|
||||
}
|
||||
|
||||
$location = Get-Command "git.exe" -CommandType Application
|
||||
|
@ -398,16 +398,16 @@ function ExtractAllFromTarGz(
|
|||
$appDir = Join-Path $location "usr\bin"
|
||||
$completeApp = Join-Path $appDir "tar.exe"
|
||||
|
||||
if (-not (test-path -path "$completeApp" -PathType Leaf)) {
|
||||
if (-not (Test-Path -path $completeApp -PathType Leaf)) {
|
||||
throw "Unpacking the file [$targzFileName] requires extraction utility [$completeApp].\n The utility wasn't found"
|
||||
}
|
||||
|
||||
$compleDestination = Join-Path $destination $targzFileName
|
||||
$completeDestination = Join-Path $destination $targzFileName
|
||||
|
||||
Copy-Item $sourceFile $compleDestination -ErrorAction SilentlyContinue
|
||||
Copy-Item $sourceFile $completeDestination -ErrorAction SilentlyContinue
|
||||
|
||||
$dosCommand = @"
|
||||
set path="$appDir";%PATH% & tar.exe -xz --force-local -f "$compleDestination" -C "$destination"
|
||||
set path=$appDir;%PATH% & tar.exe -xz --force-local -f "$completeDestination" -C "$destination"
|
||||
"@
|
||||
|
||||
& cmd /c $dosCommand
|
||||
|
@ -415,7 +415,7 @@ set path="$appDir";%PATH% & tar.exe -xz --force-local -f "$compleDestination" -C
|
|||
throw "Running [$completeApp] Command failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
|
||||
Remove-Item "$compleDestination" -ErrorAction SilentlyContinue
|
||||
Remove-Item "$completeDestination" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
function CreateBatch(
|
||||
|
|
|
@ -41,7 +41,12 @@ function GetTableDefaultInt(
|
|||
function GetEnvironmentVariableContent(
|
||||
[string] $envVarName)
|
||||
{
|
||||
return [environment]::GetEnvironmentVariable($envVarName)
|
||||
$envContent = [environment]::GetEnvironmentVariable($envVarName, "USER")
|
||||
if ($envContent) {
|
||||
return $envContent
|
||||
}
|
||||
$envContent = [environment]::GetEnvironmentVariable($envVarName, "MACHINE")
|
||||
return $envContent
|
||||
}
|
||||
|
||||
# vim:set expandtab shiftwidth=2 tabstop=2:q
|
||||
# vim:set expandtab shiftwidth=2 tabstop=2:
|
||||
|
|
Загрузка…
Ссылка в новой задаче