Merge "multiproduct_kati: better directory names."

am: a41a5da52a

Change-Id: I332b487bdbce5a52b57d78cd1bc4999824b14d54
This commit is contained in:
Steven Moreland 2017-04-04 17:21:13 +00:00 committed by android-build-merger
commit 1889d015c5

View file

@ -19,12 +19,12 @@ import (
"context"
"flag"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"runtime"
"strings"
"sync"
"time"
"android/soong/ui/build"
"android/soong/ui/logger"
@ -84,9 +84,11 @@ func main() {
config := build.NewConfig(buildCtx)
if *outDir == "" {
var err error
*outDir, err = ioutil.TempDir(config.OutDir(), "multiproduct")
if err != nil {
name := "multiproduct-" + time.Now().Format("20060102150405")
*outDir = filepath.Join(config.OutDir(), name)
if err := os.MkdirAll(*outDir, 0777); err != nil {
log.Fatalf("Failed to create tempdir: %v", err)
}