Install git on UNIX

How can I install git on unix using wget?

Funny question, wget has nothing to do with installing GIT...
now we cant really reply on installation since it will depend of architecture, OS s I suppose each may have a package with their install procedure
About wget, is it because you are blocked ( in private lan, firewall ?)?

Actually ,I am working on yocto image booted on raspberry pi.I don't have apt-get option in my bin.So only option left to install git is to use wget.So ,if there is a way to install git using wget then please inform.

I've not come across yocto before. So it's a tool for building embedded Linux distributions. My first question to you is, did you build this distribution yourself, or are you using one built by somebody else?

If the former, could you rebuild the image with a package manager, or even git, built into the distribution?

You can use wget to download git, but then you still need to install it. This will have to be done either by downloading the source and building it or getting a package for your system, and you will still need a package manager such as dpkg to install it.

Andrew

Yes,I build the image myself and I have included dpkg,opkg and rpm packages.So I need to download git in order to clone to wiringpi repository.It will be really helpful and appreciable if you or someone can provide me command using wget to download and install git.

So why can't you include apt-get or the equivalent rpm front-end in your image? Why can't you include git in your image?

Andrew

Thanks a lot for guiding me.I actually tried

IMAGE_INSTALL_APPEND = "git apt dpkg opkg rpm sudo"
in my local conf and I was able to use git on my raspberrypi.
Now as a next step I am trying to install sudo on my system because ./build on wiringpi is not installing wiringpi without sudo command.
root@raspberrypi # ./build
sudo:command not found
I tried
apt-get install -y sudo
but it returned an Error:cannot find sudo package

I am trying my best to do it but it will be great if anyone could help.

Please use code tags. It looks as though the sudo package is not included in your repository. However, sudo is normally used to elevate the privilege level to that of root and you are running the build as root already. Try adding into (a directory in) your path an executable shell script with the following command:

#!/bin/sh
exec "$@"

and call it sudo . That should act as a workaround, given you don't actually need sudo in this case.

Andrew