
function calculateMD5 {
 md5url=$1
 RESULT=

 #the following should work on linux
 if [[ -x `which md5sum` ]]; then
     RESULT=`echo ${md5url} | md5sum |cut -d " " -f 1`

 #the following should work on Mac OS X
 elif [[ -x `which md5` ]]; then
     RESULT=`echo ${md5url} | md5`
 fi
 echo "MD5 cannot be calculated for ${md5url}"
}

function calculateMD5 {
 md5url=$1
 RESULT=

 #the following should work on linux
 if [[ -x `which md5sum` ]]; then
     RESULT=`echo ${md5url} | md5sum |cut -d " " -f 1`
 #the following should work on Mac OS X
 elif [[ -x `which md5` ]]; then
     RESULT=`echo ${md5url} | md5`
 else
    echo "MD5 cannot be calculated for ${md5url}"
 fi

}
Move the error message in the correct branch of the if statement when calculating the MD5.
Move the error message in the correct branch of the if statement when calculating the MD5.

git-svn-id: 9019e3cb94a522c981194da839dc9955d4aaf999@34312 60cd2ccc-2b05-0410-9566-da273a940bff
