mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-01-18 00:48:10 +01:00
build: add FlagDir variable in prebuild code.
This commit is contained in:
parent
6325314825
commit
c6a048c9ca
2 changed files with 3 additions and 1 deletions
|
@ -13,11 +13,13 @@ var (
|
|||
DistDir *paths.Path
|
||||
Root *paths.Path
|
||||
RootApparmord *paths.Path
|
||||
FlagDir *paths.Path
|
||||
)
|
||||
|
||||
func init() {
|
||||
DistDir = paths.New("dists")
|
||||
Root = paths.New(".build")
|
||||
FlagDir = DistDir.Join("flags")
|
||||
RootApparmord = Root.Join("apparmor.d")
|
||||
Distribution = getSupportedDistribution()
|
||||
}
|
||||
|
|
|
@ -135,7 +135,7 @@ func Configure() (err error) {
|
|||
// Set flags on some profiles according to manifest defined in `dists/flags/`
|
||||
func SetFlags() error {
|
||||
for _, name := range []string{"main.flags", Distribution + ".flags"} {
|
||||
path := DistDir.Join("flags", name)
|
||||
path := FlagDir.Join(name)
|
||||
if !path.Exist() {
|
||||
continue
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue