Permalink
Browse files

Fix pacman pre and post upgrade

  • Loading branch information...
zachhuff386 committed May 27, 2017
1 parent 177b507 commit c4d0df64a591324d4b7425a42c5a132a765a2398
Showing with 16 additions and 0 deletions.
  1. +16 −0 pacman/pacman.go
View
@@ -58,6 +58,22 @@ func (p *Pacman) createInstall() (exists bool, err error) {
data += "}\n"
}
if len(p.Pack.PreInst) > 0 {
data += "pre_upgrade() {\n"
for _, line := range p.Pack.PreInst {
data += fmt.Sprintf(" %s\n", line)
}
data += "}\n"
}
if len(p.Pack.PostInst) > 0 {
data += "post_upgrade() {\n"
for _, line := range p.Pack.PostInst {
data += fmt.Sprintf(" %s\n", line)
}
data += "}\n"
}
if len(p.Pack.PreRm) > 0 {
data += "pre_remove() {\n"
for _, line := range p.Pack.PreRm {

0 comments on commit c4d0df6

Please sign in to comment.