mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-01-18 08:58:15 +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
|
DistDir *paths.Path
|
||||||
Root *paths.Path
|
Root *paths.Path
|
||||||
RootApparmord *paths.Path
|
RootApparmord *paths.Path
|
||||||
|
FlagDir *paths.Path
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
DistDir = paths.New("dists")
|
DistDir = paths.New("dists")
|
||||||
Root = paths.New(".build")
|
Root = paths.New(".build")
|
||||||
|
FlagDir = DistDir.Join("flags")
|
||||||
RootApparmord = Root.Join("apparmor.d")
|
RootApparmord = Root.Join("apparmor.d")
|
||||||
Distribution = getSupportedDistribution()
|
Distribution = getSupportedDistribution()
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,7 +135,7 @@ func Configure() (err error) {
|
||||||
// Set flags on some profiles according to manifest defined in `dists/flags/`
|
// Set flags on some profiles according to manifest defined in `dists/flags/`
|
||||||
func SetFlags() error {
|
func SetFlags() error {
|
||||||
for _, name := range []string{"main.flags", Distribution + ".flags"} {
|
for _, name := range []string{"main.flags", Distribution + ".flags"} {
|
||||||
path := DistDir.Join("flags", name)
|
path := FlagDir.Join(name)
|
||||||
if !path.Exist() {
|
if !path.Exist() {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue