下面的命令一般是需要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
repo init -u /workspace -b main -m lubancat_linux_generic_latest.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
# 网络不好用下面的命令
repo init -u https://cnb.cool/smk.k/LubanCat/manifests -b main -m lubancat_linux_generic.xml --repo-url https://mirrors.tuna.tsinghua.edu.cn/git/git-repo
#如果运行以上命令失败,提示: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
使用
lubancat_linux_generic_latest.xml配置文件,所有仓库均指向对应分支的最新版本,不锁定特定 commit。
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_latest.xml
# 网络不好用下面的命令
repo init -u https://cnb.cool/smk.k/LubanCat/manifests -b main -m lubancat_linux_generic_latest.xml --repo-url https://mirrors.tuna.tsinghua.edu.cn/git/git-repo
#如果运行以上命令失败,提示: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