如何在Android中包含envsetup.sh的命令?
你好 我在编译时在 android 源代码上运行了命令 ./build/envsetup.sh 。 我想使用同一文件中存在的以下命令。 -cgrep -嗯 -mm
但是我收到以下错误!!
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
我应该如何解决这个问题? 我需要对 envsetup.sh 文件进行任何更改吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
mm、mmm 和 cgrep 被定义为 shell 函数。以下内容会给您带来什么回报:
在我的环境中,我得到:
如果您没有得到任何回报,则您可能采购了错误的脚本。请记住,您不能只是使脚本可执行并运行它,因为它不会将函数导出回您的 shell。您必须使用:
OR
确保它在父 shell 中运行。
The mm, mmm and cgrep are defined as shell functions. What does the following return for you:
On my environment I get:
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:
OR
to ensure it runs in parent shell.
您需要在 AOPS 根目录中使用此命令返回您的 android 根内容:
You need to return your android root content with this command in the AOPS root directory: