twres: change how build directory is determined
Change-Id: I1af103bc276828e9ec07e20becf9df59c9535478
This commit is contained in:
+6
-3
@@ -7,6 +7,8 @@ import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path"
|
||||
"runtime"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
)
|
||||
|
||||
@@ -15,9 +17,10 @@ func getRecoveryAbsDir(ctx android.BaseContext) string {
|
||||
}
|
||||
|
||||
func getBuildAbsDir(ctx android.BaseContext) string {
|
||||
outDir := ctx.Config().Getenv("OUT")
|
||||
absIndex := strings.Index(outDir, "out")
|
||||
return string(outDir[0:absIndex])
|
||||
var b string
|
||||
_, b, _, _ = runtime.Caller(0)
|
||||
absIndex := strings.Index(filepath.Dir(b), "bootable")
|
||||
return string(b[0:absIndex])
|
||||
}
|
||||
|
||||
func copyDir(src string, dest string) error {
|
||||
|
||||
Reference in New Issue
Block a user