build: update directive and prepare tasks to new structure.
This commit is contained in:
parent
17cee26dc0
commit
b614bdda36
8 changed files with 57 additions and 17 deletions
|
|
@ -33,14 +33,15 @@ func (p Synchronise) Apply() ([]string, error) {
|
|||
}
|
||||
}
|
||||
if p.Path == "" {
|
||||
for _, name := range []string{"apparmor.d", "share"} {
|
||||
if err := paths.CopyTo(paths.New(name), prebuild.Root.Join(name)); err != nil {
|
||||
return res, err
|
||||
}
|
||||
if err := paths.CopyTo(paths.New("share"), prebuild.Root.Join("share")); err != nil {
|
||||
return res, err
|
||||
}
|
||||
if err := paths.CopyTo(prebuild.SrcApparmord, prebuild.RootApparmord); err != nil {
|
||||
return res, err
|
||||
}
|
||||
} else {
|
||||
file := paths.New(p.Path)
|
||||
destination, err := file.RelFrom(paths.New("apparmor.d"))
|
||||
destination, err := file.RelFrom(prebuild.SrcApparmord)
|
||||
if err != nil {
|
||||
return res, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue