mirror of
https://github.com/EnumeratedDev/bpm.git
synced 2026-09-16 10:36:12 +00:00
Add pre_remove.sh package scripts
This commit is contained in:
@@ -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