I'm trying to download a zipball of a git repo:
e.g.
wget https://github.com/zeromq/jzmq/zipball/master
This works fine in a web browser but on unix the file gets a weird name...how do I do this?
You also get a 'weird name' in your web browser, the server is redirecting you from
https://github.com/zeromq/jzmq/zipball/master
to somewhere on nodeload.github.com, are you saying that wget isnt following these redirects? Can you paste the output, and show the results of wget, with an ls -l.
If you want to make sure that the downloaded file has another name, use the -O
option.
wget -O myzip.zip https://github.com/zeromq/jzmq/zipball/master
Try the following command:
git archive --remote=git://git.foo.com/project.git HEAD:path/to/directory filename
Source:
https://stackoverflow.com/questions/1125476/git-retrieve-a-single-file-from-a-repository
When you say weird name, what do you mean?
This should however just be a ZIP-file. It just doesn't have the extension.
You can check this with the following command:
file master
You can unzip it with this command:
unzip master