mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-23 19:17:10 +01:00
[ps1] More fixes/tweaks
This commit is contained in:
parent
7275877332
commit
72194ae8a0
@ -194,11 +194,14 @@ function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$archivePath,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$itemCount = @(Get-ChildItem "$destinationPartial").Count
|
$items = @(Get-ChildItem "$destinationPartial")
|
||||||
|
$itemCount = $items.Count
|
||||||
|
|
||||||
if ($itemCount -eq 1)
|
if ($itemCount -eq 1)
|
||||||
{
|
{
|
||||||
Move-Item -Path "$destinationPartial\*" -Destination $output
|
$item = $items | Select-Object -first 1
|
||||||
|
Write-Host "$item"
|
||||||
|
Move-Item -Path "$destinationPartial\$item" -Destination $output
|
||||||
vcpkgRemoveItem $destinationPartial
|
vcpkgRemoveItem $destinationPartial
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -58,13 +58,14 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool)
|
|||||||
{
|
{
|
||||||
$outFilename = (Get-ChildItem $downloadPath).BaseName
|
$outFilename = (Get-ChildItem $downloadPath).BaseName
|
||||||
Write-Host "Extracting $tool..."
|
Write-Host "Extracting $tool..."
|
||||||
vcpkgExtractFile -File $downloadPath -DestinationDir $downloadsDir -outFilename $outFilename
|
vcpkgExtractFile -ArchivePath $downloadPath -DestinationDir $downloadsDir -outFilename $outFilename
|
||||||
Write-Host "Extracting $tool has completed successfully."
|
Write-Host "Extracting $tool... done."
|
||||||
}
|
}
|
||||||
|
|
||||||
if (-not (Test-Path $exePath))
|
if (-not (Test-Path $exePath))
|
||||||
{
|
{
|
||||||
throw ("Could not detect or download " + $tool)
|
Write-Error "Could not detect or download $tool"
|
||||||
|
throw
|
||||||
}
|
}
|
||||||
|
|
||||||
return $exePath
|
return $exePath
|
||||||
|
Loading…
x
Reference in New Issue
Block a user