From the top of an egg file:
#!/bin/sh if [[ `basename $0` = "setuptools-0.6c5-py2.4.egg" ]] then ...
That syntax is a bashism, not /bin/sh.
-bash-2.05b$ sh ./setuptools-0.6c5-py2.4.egg --prefix=~ ./setuptools-0.6c5-py2.4.egg: [[: not found ./setuptools-0.6c5-py2.4.egg is not the correct name for this egg file. Please rename it back to setuptools-0.6c5-py2.4.egg and try again.
This is broken for Solaris (which doesn't have bash, by default), on recent Ubuntu (which has /bin/dash as /bin/sh, not bash) and any other Unix that doesn't have bash as /bin/sh.