diff options
author | Brian Carlstrom <bdc@google.com> | 2015-09-30 20:28:54 -0700 |
---|---|---|
committer | Brian Carlstrom <bdc@google.com> | 2015-09-30 20:36:15 -0700 |
commit | f2257427d9b2635e9bafbf94043f5f17d4192207 (patch) | |
tree | 265c9bbe91ca7a37e8d88e6bdc3db14b6e95358d /envsetup.sh | |
parent | 5e858e3db9f7b2037dc9e03c08f9687d5a6718bd (diff) | |
download | build-f2257427d9b2635e9bafbf94043f5f17d4192207.zip build-f2257427d9b2635e9bafbf94043f5f17d4192207.tar.gz build-f2257427d9b2635e9bafbf94043f5f17d4192207.tar.bz2 |
Use $OUT_DIR/filelist when OUT_DIR is set
Change-Id: Iadf3f05e752d71371d3d74e670ade3e937b1cd92
Diffstat (limited to 'envsetup.sh')
-rw-r--r-- | envsetup.sh | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/envsetup.sh b/envsetup.sh index dba64ee..6ad3a9e 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -1355,14 +1355,20 @@ function godir () { return fi T=$(gettop) - if [[ ! -f $T/filelist ]]; then + if [ ! "$OUT_DIR" = "" ]; then + mkdir -p $OUT_DIR + FILELIST=$OUT_DIR/filelist + else + FILELIST=$T/filelist + fi + if [[ ! -f $FILELIST ]]; then echo -n "Creating index..." - (\cd $T; find . -wholename ./out -prune -o -wholename ./.repo -prune -o -type f > filelist) + (\cd $T; find . -wholename ./out -prune -o -wholename ./.repo -prune -o -type f > $FILELIST) echo " Done" echo "" fi local lines - lines=($(\grep "$1" $T/filelist | sed -e 's/\/[^/]*$//' | sort | uniq)) + lines=($(\grep "$1" $FILELIST | sed -e 's/\/[^/]*$//' | sort | uniq)) if [[ ${#lines[@]} = 0 ]]; then echo "Not found" return |