--- fetch_runtime.sh.orig 2009-05-09 13:10:19.323938516 +0200 +++ fetch_runtime.sh 2009-05-09 13:36:35.160546090 +0200 @@ -43,7 +43,7 @@ # if we have the file and the MD5sum fails, we technically don't have the file if [ -f ${_file} ]; then # MD5 fails ? ... we don't have the file - if [ $(echo "${_md5} ${_file}" | md5sum --status -c -) ]; then + if ! $(echo "${_md5} ${_file}" | md5sum --status -c -); then rm ${_file} else _havefile=1 @@ -53,10 +53,10 @@ _cachefile=${srcdir}/${_versiondir}/runtime/${_file} if [ ${_havefile} -ne 1 -a -f ${_cachefile} ]; then # MD5 fails ? ... we lookup if we downloaded another version earlier - if [ $(echo "${_md5} ${_cachefile}" | md5sum --status -c -) ]; then + if ! $(echo "${_md5} ${_cachefile}" | md5sum --status -c -); then _cachefile=${_srccache}/${_file} if [ -f ${_cachefile} ]; then - if [ $(echo "${_md5} ${_cachefile}" | md5sum --status -c -) ]; then + if ! $(echo "${_md5} ${_cachefile}" | md5sum --status -c -); then rm ${_cachefile} else cp ${_cachefile} ${_dir} @@ -72,7 +72,7 @@ _cachefile=${_srccache}/${_file} if [ ${_havefile} -ne 1 -a -f ${_cachefile} ]; then # MD5 fails ? ... we don't have the file - if [ $(echo "${_md5} ${_cachefile}" | md5sum --status -c -) ]; then + if ! $(echo "${_md5} ${_cachefile}" | md5sum --status -c -); then rm ${_cachefile} else cp ${_cachefile} ${_dir} @@ -92,7 +92,7 @@ fi # check the MD5 sum finally - if [ $(echo "${_md5} ${_file}" | md5sum --status -c -) ]; then + if ! $(echo "${_md5} ${_file}" | md5sum --status -c -); then echo "!!!! md5sum check for ${_file} failed !!!!" errors=$((${_errors} + 1)) fi