mirror of
https://github.com/Baipyrus/dotfiles.git
synced 2024-11-14 23:23:50 +00:00
move only once when downloading data
This commit is contained in:
parent
59649a5ffa
commit
05ea34a711
@ -87,6 +87,7 @@ function ProcessUrlFiles
|
|||||||
if (-not (Test-Path $tmpApp))
|
if (-not (Test-Path $tmpApp))
|
||||||
{ New-Item -ItemType Directory -Path $tmpApp | Out-Null
|
{ New-Item -ItemType Directory -Path $tmpApp | Out-Null
|
||||||
}
|
}
|
||||||
|
Set-Location $tmpApp
|
||||||
|
|
||||||
# Find all .url files in the source directory
|
# Find all .url files in the source directory
|
||||||
$urlFiles = Get-ChildItem -Path $sourceDir -Filter '*.url'
|
$urlFiles = Get-ChildItem -Path $sourceDir -Filter '*.url'
|
||||||
@ -116,7 +117,7 @@ function ProcessUrlFiles
|
|||||||
}
|
}
|
||||||
|
|
||||||
Write-Host "Downloading $fileName from $url$conditional..." -ForegroundColor Cyan
|
Write-Host "Downloading $fileName from $url$conditional..." -ForegroundColor Cyan
|
||||||
Set-Location $tmpApp; curl -LO $url; Set-Location -
|
curl -LO $url
|
||||||
$tmpDestination = "$tmpApp\$fileName$extension"
|
$tmpDestination = "$tmpApp\$fileName$extension"
|
||||||
|
|
||||||
# Copy only if destination is provided
|
# Copy only if destination is provided
|
||||||
@ -136,6 +137,7 @@ function ProcessUrlFiles
|
|||||||
Write-Host "Cloning $fileName from $url to $destinationPath..." -ForegroundColor Cyan
|
Write-Host "Cloning $fileName from $url to $destinationPath..." -ForegroundColor Cyan
|
||||||
git clone $url $destinationPath
|
git clone $url $destinationPath
|
||||||
}
|
}
|
||||||
|
Set-Location -
|
||||||
}
|
}
|
||||||
|
|
||||||
# Setting up Alacritty Configuration
|
# Setting up Alacritty Configuration
|
||||||
|
Loading…
Reference in New Issue
Block a user