Skip to content

Commit

Permalink
twres: change how build directory is determined
Browse files Browse the repository at this point in the history
Change-Id: I1af103bc276828e9ec07e20becf9df59c9535478
  • Loading branch information
bigbiff authored and epicX67 committed Nov 4, 2021
1 parent bc6d470 commit 6376a56
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions soong/copy.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import (
"io/ioutil"
"os"
"path"
"runtime"
"path/filepath"
"strings"
)

Expand All @@ -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 {
Expand Down

0 comments on commit 6376a56

Please sign in to comment.