[Swift-devel] bash profile emitting text causes md5sum to be not located

Ben Clifford benc at hawaga.org.uk
Mon Feb 9 05:12:22 CST 2009


On teraport, my .bash_profile emits some information to stdout at login.

That causes bootstrap.sh to be unable to get confused (it takes the 
bash_profile output to be the name of the md5sum executable, and then is 
unable to execute).

This change stops that happening for me:

-MD5SUM=`find 'which gmd5sum'`
+MD5SUM=`which gmd5sum`
 if [ "X$MD5SUM" == "X" ]; then
-       MD5SUM=`find 'which md5sum'`
+       MD5SUM=`which md5sum`

This is because the find command (which is a shell procedure in this case, 
not unix find) first invokes the command, and if it gives no output, 
invokes it again with a bash login shell, which then does give output in 
the gmd5sum case when it should not.

I think maybe that this should not happen in the bowels of the bootstrap 
script - either the environment is correctly initialised for the whole 
bootstrap script, or it is not. (this ties into the question of whether 
bash should be invoked with -l or not for the whole bootstrap script and 
other environmental configuration)

-- 



More information about the Swift-devel mailing list