simplify src download

This commit is contained in:
jguer
2022-11-14 01:14:13 +01:00
parent fd46fa0f33
commit 3f7f55f260
7 changed files with 71 additions and 34 deletions

View File

@@ -69,8 +69,7 @@ func installLocalPKGBUILD(
return err
}
cleanFunc := preparer.ShouldCleanMakeDeps(ctx)
if cleanFunc != nil {
if cleanFunc := preparer.ShouldCleanMakeDeps(ctx); cleanFunc != nil {
installer.AddPostInstallHook(cleanFunc)
}
@@ -79,6 +78,10 @@ func installLocalPKGBUILD(
return err
}
if cleanAURDirsFunc := preparer.ShouldCleanAURDirs(ctx, pkgBuildDirs); cleanAURDirsFunc != nil {
installer.AddPostInstallHook(cleanAURDirsFunc)
}
if err = installer.Install(ctx, cmdArgs, topoSorted, pkgBuildDirs); err != nil {
if errHook := installer.RunPostInstallHooks(ctx); errHook != nil {
text.Errorln(errHook)