分类: Android平台
2013-11-05 16:02:54
-
安装到bin目录下,并设置到环境变量中
$ mkdir ~/bin
$ PATH=~/bin:$PATH
-
下载repo工具,修改
$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo $ chmod a+x ~/bin/repo
$ chmod a+x ~/bin/repo
mkdir WORKING_DIRECTORY
cd WORKING_DIRECTORY
$ 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_r1repo sync
#! /bin/bash echo "=====start repo sync======" repo sync while [ $? = 1 ]; do echo “======sync failed, re-sync again======” sleep 3 repo sync done