aboutsummaryrefslogtreecommitdiff
path: root/ui/build/cleanbuild.go
diff options
context:
space:
mode:
Diffstat (limited to 'ui/build/cleanbuild.go')
-rw-r--r--ui/build/cleanbuild.go27
1 files changed, 27 insertions, 0 deletions
diff --git a/ui/build/cleanbuild.go b/ui/build/cleanbuild.go
index 9df3ac0ef..a323818d8 100644
--- a/ui/build/cleanbuild.go
+++ b/ui/build/cleanbuild.go
@@ -54,6 +54,33 @@ func dataClean(ctx Context, config Config, what int) {
removeGlobs(ctx, filepath.Join(config.ProductOut(), "data", "*"))
}
+// Remove everything relevant for a clean ota package
+func deviceClean(ctx Context, config Config, what int) {
+
+ productOutPath := config.ProductOut()
+ productOut := func(path string) string {
+ return filepath.Join(productOutPath, path)
+ }
+
+ removeGlobs(ctx,
+ productOut("*.cpio"),
+ productOut("*.img"),
+ productOut("*.zip"),
+ productOut("*.zip.md5sum"),
+ productOut("android-info.txt"),
+ productOut("Changelog.txt"),
+ productOut("kernel"),
+ productOut("ramdisk"),
+ productOut("recovery"),
+ productOut("root"),
+ productOut("symbols"),
+ productOut("system"),
+ productOut("system_other"),
+ productOut("vendor"))
+
+ ctx.Println("Device specific stuff removed.")
+}
+
// installClean deletes all of the installed files -- the intent is to remove
// files that may no longer be installed, either because the user previously
// installed them, or they were previously installed by default but no longer