安装gclient

gclient是deptools的子项目,先安装deptools

git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git

这个需要翻墙。
然后运行下面命令,添加环境变量,这里的pwd是你的depot_tools目录路径,当然你也可以进到目录,然后运行该命令,pwd就是当前路径命令。

river@ubuntu:~$ export PATH=`pwd`/depot_tools:"$PATH"

添加完毕后,尝试下gclient命令

river@ubuntu:~$ export PATH=`pwd`/depot_tools:"$PATH"
river@ubuntu:~$ gclient
Usage: gclient.py <command> [options]

Meta checkout manager supporting both Subversion and GIT.

Commands are:
  cleanup  cleans up all working copies
  config   creates a .gclient file in the current directory
  diff     displays local diff for every dependencies
  fetch    fetches upstream commits for all modules
  grep     greps through git repos managed by gclient
  help     prints list of commands or help for a specific command
  hookinfo outputs the hooks that would be run by `gclient runhooks`
  pack     generates a patch which can be applied at the root of the tree
  recurse  operates [command args ...] on all the dependencies
  revert   reverts all modifications in every dependencies
  revinfo  outputs revision info mapping for the client and its dependencies
  root     outputs the solution root (or current dir if there isn't one)
  runhooks runs hooks for files that have been modified in the local working copy
  status   shows modification status for every dependencies
  sync     checkout/update all modules
  verify   verifies the DEPS file deps are only from allowed_hosts

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -j JOBS, --jobs=JOBS  Specify how many SCM commands can run in parallel;
                        defaults to 8 on this machine
  -v, --verbose         Produces additional output for diagnostics. Can be
                        used up to three times for more logging info.
  --gclientfile=CONFIG_FILENAME
                        Specify an alternate .gclient file
  --spec=SPEC           create a gclient file containing the provided string.
                        Due to Cygwin/Python brokenness, it can't contain any
                        newlines.
  --no-nag-max          Ignored for backwards compatibility.
Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐