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