[Feature request] Import command
Closed this issue · 7 comments
Strahinja commented
I think it would be nice to have a counterpart to scoop export > file
, for example scoop import file
. I know this can currently be achieved in an alternative way, but still it would be more convenient to have a built-in command.
Cologler commented
Currently, I use the script to export apps in a single text file:
function ScoopExport {
$buckets = @{}
Get-ChildItem '~\scoop\buckets\' | ForEach-Object {
$job = Start-Job -WorkingDirectory $_.FullName -ScriptBlock {
git remote get-url origin
}
$remote = Receive-Job $job -Wait -AutoRemoveJob
$buckets[$_.BaseName] = $remote
}
$apps = scoop export | ForEach-Object {
$_ -match '^(?<app>[^\(]+) \(.*\) \[(?<bucket>.*)\]' | Out-Null
return "$($Matches.bucket)/$($Matches.app)"
}
return @{
apps = $apps
buckets = $buckets
} | ConvertTo-Json
}
It attached the bucket info to apps list:
Cologler commented
@AlJohri commented on 2020年10月22日 GMT+8 下午12:28:
@Cologler this is great! do you have a corresponding import script?
jimbrig commented
Any updates on this issue?
rashil2000 commented
Not yet, would you like to work on it?
jimbrig commented
@rashil2000 I will see if i can fit some time in before returning to work monday and let you know. Thanks!
rashil2000 commented
If it helps, there was some work done regarding this, see - #2105