repo的简单使用

下载 repo 工具:
mkdir ~/bin
PATH=~/bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
导入到环境变量
export PATH=~/bin:$PATH
export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo'
初始化repo仓库*
repo init -u https://mirrors.tuna.tsinghua.edu.cn/git/AOSP/platform/manifest -b android-1.6_r1
    -u:指定从中检索清单代码库的网址。常见清单位于 https://android.googlesource.com/platform/manifest。
    -m:选择代码库中的清单文件。如果未选择清单名称,则默认为 default.xml。
    -b:指定修订版本,即特定的 manifest-branch。
下载源码*
repo sync -c -j16
    -c, --current-branch  fetch only current branch from server 当前分支
    -j JOBS, --jobs=JOBS  projects to fetch simultaneously (default 4) 多线程
显示manifest文件内容*
repo manifest
在每个项目中运行指定的 shell 命令(迭代器)
repo forall -c <COMMAND>
    -c:要运行的命令和参数。
    COMMAND: shell指令
将工作树与临时区域(索引)以及此分支 (HEAD) 上的最近一次提交进行比较。在这三种状态存在差异之处显示每个文件的摘要行*
repo status
参考博客

https://source.android.com/source/using-repo#top_of_page
https://wiki.jikexueyuan.com/project/android-source/using-repo.html
https://source.android.google.cn/setup/develop/repo

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值