repo

作者: 吉吉的纸飞机 | 来源:发表于2022-01-09 19:48 被阅读0次

1.下载repo

sudo snap install git git-repo    
mkdir   ~/temp
cd  ~/temp

google

curl http://gerrit.googlesource.com/git-repo/repo > ~/temp/repo

国内

curl [https://mirrors.tuna.tsinghua.edu.cn/git/git-repo](https://mirrors.tuna.tsinghua.edu.cn/git/git-repo) -o repo

curl "http://php.webtutor.pl/en/wp-content/uploads/2011/09/repo" > ~/temp/repo
chmod a+x ~/bin/repo

2.环境变量
临时

PATH=~/temp:$PATH

永久 如添加.zshrc

export PATH=~/temp:$PATH
export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/'

这里的repo只是一个引导脚本而不是直接称之为repo,因为repo大部分功能代码都不在其中,下载的只是帮助整个repo程序继续下载和加载的工具。

初始化:
Android官方

repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest -b android-12.0.0_r16

或私有仓库

repo init -u ssh://xxxx@192.168.0.241:29418/xxx/manifest -b default

同步

repo sync 

--------------------------------------------抄大佬的脚本-------------------------------------------------------------
Ubuntu 18.0.4

### Step 4. install AOSP

# install repo
sudo apt install repo

# repo init (just a try, then would occur the problem concerning with python2)
VERSION="android-11.0.0_r1"
repo init -u https://android.googlesource.com/platform/manifest -b $VERSION

# change default python from 2 to 3 (don't run this before first repo init, otherwise causing another problem)
sudo sed -i '1s/python/python3/' /usr/bin/repo

# repo init again
repo init -u https://android.googlesource.com/platform/manifest -b $VERSION

# !IMPRTANT: set the mirror into chinese, otherwise would cost a lot of net flow
# there are two mirrors recommended, one is from TUNA: `https://mirrors.tuna.tsinghua.edu.cn/git/AOSP/` and another is BFSU: `https://mirrors.bfsu.edu.cn/git/AOSP/`
AOSP_MIRROR="https://mirrors.bfsu.edu.cn/git/AOSP/"
git config --global url.${AOSP_MIRROR}.insteadof https://android.googlesource.com

# repo sync 
repo sync -j32


相关文章

  • 基本概念资料汇总

    repo repo介绍CSDN repo博客 挂载 挂载

  • Pod 常见问题解决

    1,pod repo 切换源 pod repo remove masterpod repo add master ...

  • Git reset a remote repo url

    For instance, the repo is: But for some reason, the repo ...

  • cocoapods远程私有库

    制作私有远程库repo 1、pod repo //查看当前所有的repo 2、准备私有repo的url需要在代码...

  • repo/gerrit总结

    楔子 新接手一个项目,要用到repo和gerrit,总结下repo使用过程。 repo/gerrit概述 repo...

  • iOS 组件化初识

    一、创建本地repo,并与远端repo私有索引库关联 GitLab创建repo私有库 本地创建repo索引文件,并...

  • 制作cocoapods笔记

    1.pod repo list //本机repo list 2.pod repo remove xxx //删除...

  • Repo

    Repo是Google开发的用于管理Android版本库的一个工具。repo并不是用来取代Git,而是用Pytho...

  • Repo

    Repo是干什么的? 用来统一管理Android源代码的工具 Repo命令 核心形式:repo 列如: re...

  • repo

    Download repo git clone git@gitlab.com:semiscone/repo.git...

网友评论

      本文标题:repo

      本文链接:https://www.haomeiwen.com/subject/jzoecrtx.html