Skip to content

Commit

Permalink
Update scoop-import.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
zStruCat authored Jul 6, 2022
1 parent a65f84c commit e70521f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions libexec/scoop-import.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ param(
$scoopfile
)

. "$PSScriptRoot\..\lib\buckets.ps1" # Get-LocalBucket
. "$PSScriptRoot\..\lib\manifest.ps1"

$import = $null
Expand All @@ -28,9 +29,16 @@ foreach ($item in $import.config.PSObject.Properties) {
Write-Host "'$($item.Name)' has been set to '$($item.Value)'"
}

foreach ($item in $import.buckets) {
add_bucket $item.Name $item.Source | Out-Null

$local_buckets = Get-LocalBucket
foreach($item in $import.buckets){
if($item.Name -in $local_buckets){
Write-Host "'$($item.Name)' is already your local bucket. It won't be added again."
}else{
add_bucket $item.Name $item.Source
}
$bucket_names += $item.Name
}
}

foreach ($item in $import.apps) {
Expand Down

0 comments on commit e70521f

Please sign in to comment.