Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build script removing a trailing comma. Download into a temp folder. #429

Merged
merged 1 commit into from
Mar 18, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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