Merge pull request #429 from Jackbennett/mend-build

Fix build script removing a trailing comma. Download into a temp folder.
This commit is contained in:
Martin Kemp 2015-03-18 14:54:55 +00:00
commit 8b8f98c078
2 changed files with 4 additions and 3 deletions

View File

@ -47,7 +47,7 @@ Param(
[string]$launcher = "..\launcher",
# Include git with the package build
[switch]$Full,
[switch]$Full
)
. "$PSScriptRoot\utils.ps1"
@ -59,6 +59,7 @@ $sources = Get-Content $sourcesPath | Out-String | Convertfrom-Json
# Check for requirements
Ensure-Exists $sourcesPath
Ensure-Executable "7z"
New-Item -Type Directory -Path (Join-Path $saveTo "/tmp/") -ErrorAction SilentlyContinue >$null
foreach ($s in $sources) {
if($Full -eq $false -and $s.name -eq "msysgit"){
@ -68,7 +69,7 @@ foreach ($s in $sources) {
Write-Verbose "Getting $($s.name) from URL $($s.url)"
# We do not care about the extensions/type of archive
$tempArchive = "$($s.name).tmp"
$tempArchive = "tmp/$($s.name).tmp"
Delete-Existing $tempArchive
Delete-Existing $s.name

View File

@ -28,7 +28,7 @@ function Delete-Existing ($path) {
}
function Extract-Archive ($source, $target) {
Invoke-Expression "7z x -y -o$($target) $source > `$null"
Invoke-Expression "7z x -y -o$($target) '$source' > `$null"
if ($lastexitcode -ne 0) {
Write-Error "Extracting of $source failied"
}