安装步骤:
1、根目录下创建.bin文件夹
mkdir ~/bin
2、配置为永久环境变量
打开:vi ~/.bashrc
在文件末尾加上:export PATH=~/bin:$PATH
生效:source ~/.bashrc
3、下载repo源码
git clone https://gerrit-googlesource.lug.ustc.edu.cn/git-repo
4、将下载的git-repo目录下的repo可执行文件拷贝到bin目录
5、chmod a+x ~/bin/repo
6、在bin目录下创建source目录,然后将整个git-repo目录拷贝到source目录下,并将git-repo文件夹命名为repo,然后保证你的bin目录是以下结构
7、安装完成