aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Carlstrom <bdc@google.com>2015-10-04 19:47:22 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-10-04 19:47:22 +0000
commitfa2ce3b38be8889a0ccaa5968ebdeae80f33b0de (patch)
tree96f2199931e28df75b94e8288dbbef0bccbf0046
parent3d6e194eafbb441c79d4cd306af85eeb34fb75e8 (diff)
parentf73f79f1b63c7cb7679264a6c6e4f86fdd78309c (diff)
downloadbuild-fa2ce3b38be8889a0ccaa5968ebdeae80f33b0de.tar.gz
am f73f79f1: Merge "Use /filelist when OUT_DIR is set" into mnc-dev
* commit 'f73f79f1b63c7cb7679264a6c6e4f86fdd78309c': Use $OUT_DIR/filelist when OUT_DIR is set
-rw-r--r--envsetup.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/envsetup.sh b/envsetup.sh
index dba64ee974..6ad3a9e80c 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