mirror of
https://github.com/safing/portmaster
synced 2025-09-03 11:09:28 +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"
|
"github.com/safing/portmaster/updates/helper"
|
||||||
)
|
)
|
||||||
|
|
||||||
var reset bool
|
var (
|
||||||
|
reset bool
|
||||||
|
intelOnly bool
|
||||||
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
rootCmd.AddCommand(updateCmd)
|
rootCmd.AddCommand(updateCmd)
|
||||||
|
@ -19,6 +22,7 @@ func init() {
|
||||||
|
|
||||||
flags := updateCmd.Flags()
|
flags := updateCmd.Flags()
|
||||||
flags.BoolVar(&reset, "reset", false, "Delete all resources and re-download the basic set")
|
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 (
|
var (
|
||||||
|
@ -49,6 +53,11 @@ func indexRequired(cmd *cobra.Command) bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
func downloadUpdates() error {
|
func downloadUpdates() error {
|
||||||
|
// Check if only intel data is mandatory.
|
||||||
|
if intelOnly {
|
||||||
|
helper.IntelOnly()
|
||||||
|
}
|
||||||
|
|
||||||
// Set required updates.
|
// Set required updates.
|
||||||
registry.MandatoryUpdates = helper.MandatoryUpdates()
|
registry.MandatoryUpdates = helper.MandatoryUpdates()
|
||||||
registry.AutoUnpack = helper.AutoUnpackUpdates()
|
registry.AutoUnpack = helper.AutoUnpackUpdates()
|
||||||
|
|
Loading…
Add table
Reference in a new issue