Skip to content

Commit

Permalink
Merge pull request #429 from Jackbennett/mend-build
Browse files Browse the repository at this point in the history
Fix build script removing a trailing comma. Download into a temp folder.
  • Loading branch information
MartiUK committed Mar 18, 2015
2 parents 58a89e7 + 2c184f8 commit 8b8f98c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Param(
[string]$launcher = "..\launcher",

# Include git with the package build
[switch]$Full,
[switch]$Full
)

. "$PSScriptRoot\utils.ps1"
Expand All @@ -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"){
Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion scripts/utils.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down

0 comments on commit 8b8f98c

Please sign in to comment.