diff --git a/_posts/help/1970-01-01-weave.md b/_posts/help/1970-01-01-weave.md new file mode 100644 index 0000000..be07073 --- /dev/null +++ b/_posts/help/1970-01-01-weave.md @@ -0,0 +1,101 @@ +--- +layout: help +category: help +mirrorid: weave +permalink: /help/weave/ +--- + +## Weave 镜像使用帮助 + +> Weave is a communications platform that includes the Weave Device SDK and the Weave Server to enable OEM manufactures to connect their devices to Google cloud services. + +简单说 Weave 是 Google 开发的物联网通讯平台。TUNA 同步该镜像代码的主要意义在于用于 [chromiumos](/help/chromiumos)的同步,继续看之前请确认你真的需要使用 [weave](https://developers.google.com/weave/) 的源代码。 + +#### 准备工作 + +下载 repo 工具: + +```bash +mkdir ~/bin +PATH=~/bin:$PATH +curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo +chmod a+x ~/bin/repo +``` + +或者使用tuna的[git-repo镜像](https://mirrors.tuna.tsinghua.edu.cn/help/git-repo/) + +#### 下载代码 + +建立工作目录: + +``` +mkdir WORKING_DIRECTORY +cd WORKING_DIRECTORY +``` + +初始化仓库: + +``` +repo init -u https://mirrors.tuna.tsinghua.edu.cn/git/weave/weave/manifest +``` + +**注意: 本镜像是 Weave 的 master 分支的镜像,如果使用本镜像下载 Weave 的其他版本很大概率会失败** + +接着使用编辑器打开`.repo/manifests/default.xml`这个文件,将 + +``` +"https://chromium.googlesource.come" +``` + +替换为 + +``` +"https://mirrors.tuna.tsinghua.edu.cn/git/chromiumos/" +``` + +将 + +``` +"https://android.googlesource.come" +``` + +替换为 + +``` +"https://aosp.tuna.tsinghua.edu.cn/" +``` + +将 + +``` +"https://weave.googlesource.come" +``` + +替换为 + +``` +"https://mirrors.tuna.tsinghua.edu.cn/git/weave/" +``` + +并删除如下几行(这几行是非公开的repo,因此tuna并没有镜像): + +``` + + + +``` + +即可。 + + +如果提示无法连接到 gerrit.googlesource.com,可以先运行如下指令: + +``` +export REPO_URL = 'https://mirrors.tuna.tsinghua.edu.cn/git/git-repo' +``` + +同步源码树(以后只需执行这条命令来同步): + +``` +repo sync +```