mirror of
https://github.com/EnumeratedDev/bpm.git
synced 2026-10-31 19:01:48 +00:00
Add pre_remove.sh package scripts
This commit is contained in:
1 parent
e6cfd112ea
commit
e1726ddce5
1 file changed
+6
@@ -316,6 +316,12 @@ func ExecutePackageScripts(filename, rootDir string, operation Operation, postOp
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if operation == Remove {
|
} else if operation == Remove {
|
||||||
|
if val, ok := scripts["pre_remove.sh"]; !postOperation && ok {
|
||||||
|
err := run("pre_remove.sh", val)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
if val, ok := scripts["post_remove.sh"]; postOperation && ok {
|
if val, ok := scripts["post_remove.sh"]; postOperation && ok {
|
||||||
err := run("post_remove.sh", val)
|
err := run("post_remove.sh", val)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in new issue
Block a user