Skip to content

Instantly share code, notes, and snippets.

@HUMORCE
Last active July 29, 2022 14:11
Show Gist options
  • Save HUMORCE/1add93259ed5cbabd31e0c2bb28b4caf to your computer and use it in GitHub Desktop.
Save HUMORCE/1add93259ed5cbabd31e0c2bb28b4caf to your computer and use it in GitHub Desktop.
# useage:
# scoop-import <exported_list_file>
param(
$exported
)
$apps = (
Get-Content -Path $exported | Select-String '(?<app>.*)\s\(v:(?<version>.*)\)\s\[(?<bucket>.*)\]' -AllMatches |
Foreach-Object {$_.Matches} |
Foreach-Object {($_.Groups["bucket"].Value)+"/"+($_.Groups["app"].Value)}
)
$apps = ($apps | Out-String).Replace("`r`n"," ")
$cmd = "scoop install " + $apps.Trim(" ")
Invoke-Expression $cmd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment