Skip to content

Commit

Permalink
Improve 1k/fetch.ps1 [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
halx99 committed Jun 8, 2024
1 parent 2db42ad commit d915050
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions 1k/fetch.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,13 @@ function fetch_repo($url, $name, $dest, $ext) {
git clone --progress $url $dest | Out-Host
}
else {
$filename = "$Script:url_pkg_name$ext"
$out = Join-Path $cache_dir $filename
$out = Join-Path $cache_dir "$Script:url_pkg_name$ext"
download_file $url $out
try {
if ($ext -eq '.zip') {
Expand-Archive -Path $out -DestinationPath $prefix -Force
}
elseif ($filename -match '.+\.tar(\..*)?$'){
elseif ($ext -match '\.tar(\..*)?$'){
tar xf "$out" -C $prefix
}
}
Expand Down

0 comments on commit d915050

Please sign in to comment.