Reputation: 5244
Hi I have run the command ./build/envsetup.sh on my source code of android while compiling. I want to use the following commands present in the same file. -cgrep -mmm -mm
but I get the following errors!!
Command 'pgrep' from package 'procps' (main)
Command 'fgrep' from package 'grep' (main)
Command 'egrep' from package 'grep' (main)
Command 'sgrep' from package 'sgrep' (universe)
Command 'grep' from package 'grep' (main)
Command 'lgrep' from package 'lv' (universe)
Command 'rgrep' from package 'grep' (main)
Command 'zgrep' from package 'gzip' (main)
Command 'dgrep' from package 'debian-goodies' (main)
Command 'vgrep' from package 'atfs' (universe)
Command 'ngrep' from package 'ngrep' (universe)
Command 'wcgrep' from package 'kdesdk-scripts' (main)
Command 'agrep' from package 'agrep' (multiverse)
Command 'xgrep' from package 'xgrep' (universe)
cgrep: command not found
How should I resolve this? Do I need to make any changes in the envsetup.sh file?
Upvotes: 3
Views: 9623
Reputation: 353
You need to return your android root content with this command in the AOPS root directory:
source ./build/envsetup.sh
Upvotes: 0
Reputation: 6592
The mm, mmm and cgrep are defined as shell functions. What does the following return for you:
set | egrep "^mmm \(\)|^mm \(\)|^cgrep \(\)"
On my environment I get:
cgrep ()
mm ()
mmm ()
If you are getting nothing back, you are probably sourcing the script wrong. Remember you can't just make the script executable and run it as it won't be exporting the functions back to your shell. You must use either:
. build/envsetup.sh
OR
source build/envsetup.sh
to ensure it runs in parent shell.
Upvotes: 3