http://blog.csdn.net/forlong401/article/details/8517711 android
不少时候,咱们在windows下安装完cygwin后,使用时发现装少了软件。那么怎么办? git
1)有的人说用setup.exe那个玩意再搞一遍。我的比较以为那个方法蛋疼。 shell
2)有的人说用find命令,怎么安装之类的,也不太爽。 ubuntu
3)后来发现apt-cyg这个程序,真是强大啊。使用方法和ubuntu下的apt-get同样。爽死啦。 windows
安装apt-cyg的方法以下(在cygwin中输入以下命令): curl
# svn --force export http://apt-cyg.googlecode.com/svn/trunk/ /bin/ # chmod +x /bin/apt-cyg
使用apt-cyg来安装软件: svn
# apt-cyg install git-core gnupg flex bison gperf build-essential zip curl
好了开始下载android源代码吧: oop
新建home下的bin目录: flex
$ mkdir ~/bin $ PATH=~/bin:$PATH下载repo:
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo $ chmod a+x ~/bin/repo新建工程目录:
$ mkdir WORKING_DIRECTORY $ cd WORKING_DIRECTORY初始化仓库:
$ repo init -u https://android.googlesource.com/platform/manifest下载文件:
$ repo sync
参考: ui
你要是想看看这个牛逼的软件是怎么实现的能够checkout过来看看(其实就是shell脚本。O(∩_∩)O哈哈~):
svn checkout http://apt-cyg.googlecode.com/svn/trunk/ apt-cyg-read-only
工程连接以下:
http://code.google.com/p/apt-cyg/
固然若是屌丝想看英文就看吧:
apt-cyg is a command-line installer for Cygwin which cooperates with Cygwin Setup and uses the same repository. The syntax is similar to apt-get. Usage examples:
First install subversion and wget through the standard cygwin setup program. Then run the following commands:
# svn --force export http://apt-cyg.googlecode.com/svn/trunk/ /bin/ # chmod +x /bin/apt-cyg
# apt-cyg install nano