Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Import command #3934

Closed
Strahinja opened this issue Apr 21, 2020 · 7 comments · Fixed by #5031
Closed

[Feature request] Import command #3934

Strahinja opened this issue Apr 21, 2020 · 7 comments · Fixed by #5031

Comments

@Strahinja
Copy link

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
Copy link

Cologler commented Jul 3, 2020

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:

image

@AlJohri
Copy link

AlJohri commented Oct 22, 2020

@Cologler this is great! do you have a corresponding import script?

@Cologler
Copy link

@AlJohri commented on 2020年10月22日 GMT+8 下午12:28:

@Cologler this is great! do you have a corresponding import script?

Try https://github.com/Cologler/ScoopBackup-pwsh

@jimbrig
Copy link

jimbrig commented Dec 29, 2021

Any updates on this issue?

@rashil2000
Copy link
Member

Not yet, would you like to work on it?

@jimbrig
Copy link

jimbrig commented Jan 1, 2022

@rashil2000 I will see if i can fit some time in before returning to work monday and let you know. Thanks!

@rashil2000
Copy link
Member

If it helps, there was some work done regarding this, see - #2105

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants