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

feat(scoop-import): Import a Scoop installation from JSON #5014

Merged
merged 7 commits into from
Jun 24, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add suggestions from code review
  • Loading branch information
rashil2000 committed Jun 23, 2022
commit 5aceaf95e49e531a3c06b6744d16e3bd35514f5b
2 changes: 1 addition & 1 deletion libexec/scoop-export.ps1
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ $export = @{}
if ($args[0] -eq '-c' -or $args[0] -eq '--config') {
$export.config = $scoopConfig
# Remove machine-specific properties
foreach ($prop in 'lastUpdate', 'rootPath', 'globalPath', 'cachePath') {
foreach ($prop in 'lastUpdate', 'rootPath', 'globalPath', 'cachePath', 'alias') {
$export.config.PSObject.Properties.Remove($prop)
}
}
8 changes: 6 additions & 2 deletions libexec/scoop-import.ps1
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# Usage: scoop import <path/url to scoopfile.json>
# Summary: Imports apps, buckets and configs from a Scoopfile in JSON format

param([Parameter(Mandatory)][String]$scoopfile)

. "$PSScriptRoot\..\lib\manifest.ps1"

param(
[Parameter(Mandatory)]
[String]
$scoopfile
)

$import = $null
$bucket_names = @()
$def_arch = default_architecture