mirror of
https://github.com/cmderdev/cmder.git
synced 2024-11-10 09:49:12 +08:00
Fix build script removing a traling comma. Download into a temp folder.
I made a bad patch with the parameters syntax. I'm making the temp files go into a subfolder as if the build script stop theres a .tmp that could be accidentially tracked by source control.
This commit is contained in:
parent
3c289b455b
commit
2c184f8721
@ -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
|
||||
|
||||
|
@ -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"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user