X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=envsetup.sh;h=6ad3a9e80c4ca226e1e2643e0a4f52bb8d04201d;hb=931561f91650d685b3c1639f56429587a6b5d65b;hp=bec69932d74fb9427cb303a7ac62d121d096e496;hpb=cbaead4cfe737c96c649672b6c1396c35597b5b7;p=android-x86%2Fbuild.git diff --git a/envsetup.sh b/envsetup.sh index bec69932d..6ad3a9e80 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -175,7 +175,7 @@ function setpaths() ;; esac - export ANDROID_DEV_SCRIPTS=$T/development/scripts:$T/prebuilts/devtools/tools + export ANDROID_DEV_SCRIPTS=$T/development/scripts:$T/prebuilts/devtools/tools:$T/external/selinux/prebuilts/bin export ANDROID_BUILD_PATHS=$(get_build_var ANDROID_BUILD_PATHS):$ANDROID_TOOLCHAIN:$ANDROID_TOOLCHAIN_2ND_ARCH:$ANDROID_KERNEL_TOOLCHAIN_PATH$ANDROID_DEV_SCRIPTS: # If prebuilts/android-emulator// exists, prepend it to our PATH @@ -764,7 +764,7 @@ function mmm() MAKEFILE="$MAKEFILE $MFILE" else case $DIR in - showcommands | snod | dist | incrementaljavac) ARGS="$ARGS $DIR";; + showcommands | snod | dist | incrementaljavac | *=*) ARGS="$ARGS $DIR";; GET-INSTALL-PATH) GET_INSTALL_PATH=$DIR;; *) echo "No Android.mk in $DIR."; return 1;; esac @@ -822,7 +822,7 @@ function mmma() fi else case $DIR in - showcommands | snod | dist | incrementaljavac) ARGS="$ARGS $DIR";; + showcommands | snod | dist | incrementaljavac | *=*) ARGS="$ARGS $DIR";; *) echo "Couldn't find directory $DIR"; return 1;; esac fi @@ -1108,6 +1108,11 @@ function sepgrep() find . -name .repo -prune -o -name .git -prune -o -path ./out -prune -o -name sepolicy -type d -print0 | xargs -0 grep --color -n -r --exclude-dir=\.git "$@" } +function rcgrep() +{ + find . -name .repo -prune -o -name .git -prune -o -name out -prune -o -type f -name "*\.rc*" -print0 | xargs -0 grep --color -n "$@" +} + case `uname -s` in Darwin) function mgrep() @@ -1350,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