diff options
Diffstat (limited to 'envsetup.sh')
-rw-r--r-- | envsetup.sh | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/envsetup.sh b/envsetup.sh index f0c6b9bb1d..a44cd5053d 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -11,14 +11,17 @@ Invoke ". build/envsetup.sh" from your shell to add the following functions to y - tapas: tapas [<App1> <App2> ...] [arm|x86|mips|arm64|x86_64|mips64] [eng|userdebug|user] - croot: Changes directory to the top of the tree, or a subdirectory thereof. - m: Makes from the top of the tree. -- mm: Builds all of the modules in the current directory, but not their dependencies. -- mmm: Builds all of the modules in the supplied directories, but not their dependencies. +- mm: Builds and installs all of the modules in the current directory, and their + dependencies. +- mmm: Builds and installs all of the modules in the supplied directories, and their + dependencies. To limit the modules being built use the syntax: mmm dir/:target1,target2. -- mma: Builds all of the modules in the current directory, and their dependencies. -- mmma: Builds all of the modules in the supplied directories, and their dependencies. +- mma: Same as 'mm' +- mmma: Same as 'mmm' - provision: Flash device with all required partitions. Options will be passed on to fastboot. - cgrep: Greps on all local C/C++ files. - ggrep: Greps on all local Gradle files. +- gogrep: Greps on all local Go files. - jgrep: Greps on all local Java files. - resgrep: Greps on all local res/*.xml files. - mangrep: Greps on all local AndroidManifest.xml files. @@ -968,6 +971,12 @@ function ggrep() -exec grep --color -n "$@" {} + } +function gogrep() +{ + find . -name .repo -prune -o -name .git -prune -o -name out -prune -o -type f -name "*\.go" \ + -exec grep --color -n "$@" {} + +} + function jgrep() { find . -name .repo -prune -o -name .git -prune -o -name out -prune -o -type f -name "*\.java" \ @@ -1016,7 +1025,7 @@ case `uname -s` in Darwin) function mgrep() { - find -E . -name .repo -prune -o -name .git -prune -o -path ./out -prune -o \( -iregex '.*/(Makefile|Makefile\..*|.*\.make|.*\.mak|.*\.mk|.*\.bp)' -o -regex '(.*/)?soong/[^/]*.go' \) -type f \ + find -E . -name .repo -prune -o -name .git -prune -o -path ./out -prune -o \( -iregex '.*/(Makefile|Makefile\..*|.*\.make|.*\.mak|.*\.mk|.*\.bp)' -o -regex '(.*/)?(build|soong)/.*[^/]*\.go' \) -type f \ -exec grep --color -n "$@" {} + } @@ -1030,7 +1039,7 @@ case `uname -s` in *) function mgrep() { - find . -name .repo -prune -o -name .git -prune -o -path ./out -prune -o \( -regextype posix-egrep -iregex '(.*\/Makefile|.*\/Makefile\..*|.*\.make|.*\.mak|.*\.mk|.*\.bp)' -o -regextype posix-extended -regex '(.*/)?soong/[^/]*.go' \) -type f \ + find . -name .repo -prune -o -name .git -prune -o -path ./out -prune -o \( -regextype posix-egrep -iregex '(.*\/Makefile|.*\/Makefile\..*|.*\.make|.*\.mak|.*\.mk|.*\.bp)' -o -regextype posix-extended -regex '(.*/)?(build|soong)/.*[^/]*\.go' \) -type f \ -exec grep --color -n "$@" {} + } |