Reputation: 3037
I am trying to download Android source code for Contact,Dialer and CallLog applications from the git repository. I have tried the following on my mac(running SnowLeopard):
1. Create a bin dir and a android dir for putting all the downloaded files
2. Added both of the directories to the PATH environment variable
3. run the following commands to get the repo script and make it executable:
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
4. cd android dir
5. run repo init -u https://android.googlesource.com/platform/manifest -b froyo
When I run this command, I am getting the following errors:
Traceback (most recent call last):
File "/Users/xxxx/bin/repo", line 595, in <module>
main(sys.argv[1:])
File "/Users/xxxx/bin/repo", line 562, in main
_Init(args)
File "/Users/xxxx/bin/repo", line 181, in _Init
_CheckGitVersion()
File "/Users/xxxx/bin/repo", line 210, in _CheckGitVersion
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/subprocess.py", line 593, in __init__
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/subprocess.py", line 1079, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
A quick google search tells that I need to install git-core library. Unfortunately, I don't know if that is the real problem or not and if so, how to install it.
Upvotes: 2
Views: 4398
Reputation: 1755
If you take a look at https://android.googlesource.com/platform/packages/apps/Contacts, you will see that the basic git command is just:
git clone https://android.googlesource.com/platform/packages/apps/Contacts
that way you clone the Contacts repository into your current directory. And yes, you need to have git installed for this. If you just want to work on individual parts of the platform and don't want to check out everything then you can work with just git and you don't have to use the repo
tool at all.
Upvotes: 1
Reputation: 3123
You probably want to install git for OS X. You can find a handy installer here: http://code.google.com/p/git-osx-installer/
As long as the git directory appears in your $PATH (I can't remember if the installer does this or you'd need to do it manually), that python script should find it when it's executed. Alternatively, you could hack the python script so that it knows exactly where git is.
Upvotes: 1