下面的命令一般是需要root权限的,需要加sudo:
apt-get update apt-get install -y python3 curl -o /usr/local/bin/repo https://storage.googleapis.com/git-repo-downloads/repo chmod a+x /usr/local/bin/repo ln -s /usr/bin/python3 /usr/bin/python
# 1. 创建一个工作目录
mkdir -p ~/test-manifest && cd ~/test-manifest
# 2. 直接用本地路径初始化
repo init -u /workspace -b main -m lubancat_linux_generic.xml
#如果运行以上命令失败,提示:fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
#则可以在以上命令中添加选项 --repo-url https://mirrors.tuna.tsinghua.edu.cn/git/git-repo
# 3. 同步代码
repo sync -j4
mkdir -p ~/LubanCat_SDK && cd ~/LubanCat_SDK
# 拉取LubanCat_Linux_Generic_SDK
repo init -u https://cnb.cool/smk.k/LubanCat/manifests -b main -m lubancat_linux_generic.xml
#如果运行以上命令失败,提示:fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
#则可以在以上命令中添加选项 --repo-url https://mirrors.tuna.tsinghua.edu.cn/git/git-repo
.repo/repo/repo sync -c -j4