X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=envsetup.sh;h=6ad3a9e80c4ca226e1e2643e0a4f52bb8d04201d;hb=931561f91650d685b3c1639f56429587a6b5d65b;hp=dba64ee974f2f8c08295414fb5f75063b17eec22;hpb=18cf7136a686b9fbac837736445ca7f2edd5947e;p=android-x86%2Fbuild.git diff --git a/envsetup.sh b/envsetup.sh index dba64ee97..6ad3a9e80 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