1
0

feat!: new kernel config structure

BREAKING CHANGE: kernel definition in the configuration files has switched

from

  [[targets]]
  distro = { id = "Ubuntu", release = "18.04" }
  release_mask = ".*"

to

  [[targets]]
  distro = { id = "Ubuntu", release = "18.04" }
  kernel = { regex = ".*" }
This commit is contained in:
2023-05-18 18:48:09 +00:00
parent d551cc8fc4
commit 73f5df2425
15 changed files with 61 additions and 175 deletions

9
pew.go
View File

@ -843,15 +843,18 @@ func kernelMask(kernel string) (km config.Target, err error) {
return
}
km = config.Target{Distro: distro.Distro{ID: dt}, ReleaseMask: parts[1]}
km = config.Target{
Distro: distro.Distro{ID: dt},
Kernel: config.Kernel{Regex: parts[1]},
}
return
}
func genAllKernels() (sk []config.Target, err error) {
for _, id := range distro.IDs {
sk = append(sk, config.Target{
Distro: distro.Distro{ID: id},
ReleaseMask: ".*",
Distro: distro.Distro{ID: id},
Kernel: config.Kernel{Regex: ".*"},
})
}
return