mirror of
https://github.com/safing/portmaster
synced 2025-09-01 18:19:12 +00:00
Add intel-only flag for initializing intel data only
This commit is contained in:
parent
295efbb3a2
commit
d89609e7e7
1 changed files with 10 additions and 1 deletions
|
@ -11,7 +11,10 @@ import (
|
|||
"github.com/safing/portmaster/updates/helper"
|
||||
)
|
||||
|
||||
var reset bool
|
||||
var (
|
||||
reset bool
|
||||
intelOnly bool
|
||||
)
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(updateCmd)
|
||||
|
@ -19,6 +22,7 @@ func init() {
|
|||
|
||||
flags := updateCmd.Flags()
|
||||
flags.BoolVar(&reset, "reset", false, "Delete all resources and re-download the basic set")
|
||||
flags.BoolVar(&intelOnly, "intel-only", false, "Only make downloading intel updates mandatory")
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -49,6 +53,11 @@ func indexRequired(cmd *cobra.Command) bool {
|
|||
}
|
||||
|
||||
func downloadUpdates() error {
|
||||
// Check if only intel data is mandatory.
|
||||
if intelOnly {
|
||||
helper.IntelOnly()
|
||||
}
|
||||
|
||||
// Set required updates.
|
||||
registry.MandatoryUpdates = helper.MandatoryUpdates()
|
||||
registry.AutoUnpack = helper.AutoUnpackUpdates()
|
||||
|
|
Loading…
Add table
Reference in a new issue