Last active
July 29, 2022 14:11
-
-
Save HUMORCE/1add93259ed5cbabd31e0c2bb28b4caf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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