Chinaunix首页 | 论坛 | 博客
  • 博客访问: 815364
  • 博文数量: 125
  • 博客积分: 4066
  • 博客等级: 上校
  • 技术积分: 1401
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-03 18:58
文章分类

全部博文(125)

文章存档

2014年(1)

2013年(1)

2012年(2)

2011年(29)

2010年(92)

我的朋友

分类: Android平台

2013-11-05 16:02:54

install repo


	
  1. 安装到bin目录下,并设置到环境变量中                                             

    $ mkdir ~/bin
    $ PATH=~/bin:$PATH 
  2. 下载repo工具,修改                  

    $ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo $ chmod a+x ~/bin/repo
    $ chmod a+x ~/bin/repo

download source workspace


 新建一个source存放目录     
mkdir WORKING_DIRECTORY
cd WORKING_DIRECTORY

repo init


$ repo init -u URL [OPTIONS] 

Installs Repo in the current directory. This creates a .repo/ directory that contains Git repositories for the Repo source code and the standard Android manifest files. The .repo/ directory also contains manifest.xml, which is a symlink to the selected manifest in the .repo/manifests/ directory.

Options:

  • -u: specify a URL from which to retrieve a manifest repository. The common manifest can be found at 

  • -m: select a manifest file within the repository. If no manifest name is selected, the default is default.xml.

  • -b: specify a revision, i.e., a particular manifest-branch. (see info from URL)

$ repo init -u   -b android-4.4_r1
repo sync
 开始同步代码             



*下面有一个防止下载时掉线的sh脚本,感觉不错,转自网上                 
#! /bin/bash
echo "=====start repo sync======"  
repo sync  
while [ $? = 1 ]; do  
echo “======sync failed, re-sync again======”  
sleep 3  
repo sync  
done                                 

阅读(2036) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~