setuptools requires bash, not sh.

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. -- Anthony Baxter <anthony@interlink.com.au> It's never too late to have a happy childhood.

At 05:05 PM 1/24/2007 +1100, Anthony Baxter wrote:
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.
I've changed it to use single '[ ]' instead of doubled ones. Is that the right syntax for non-bash shells?
participants (2)
-
Anthony Baxter
-
Phillip J. Eby