Check-in [3c8c30b6bf]
Overview
Comment:Updated to fallback to SHA1 if SHA256 is unavailable
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 3c8c30b6bf1383e7cac11e2af2a9131bf3a43eb8
User & Date: rkeene on 2014-05-12 03:19:30
Other Links: manifest | tags
Context
2014-05-17
04:39
Fixed rewriting relative paths to headers and added various patches check-in: 8ed457fd51 user: rkeene tags: trunk
2014-05-12
03:19
Updated to fallback to SHA1 if SHA256 is unavailable check-in: 3c8c30b6bf user: rkeene tags: trunk
2014-05-06
21:28
Deleted huge patch from original TclTCC distribution check-in: d00df72845 user: rkeene tags: trunk
Changes

Modified build/pre.sh from [a84ae705c9] to [0d9128dc93].

     5      5   # Generate configure script
     6      6   ./build/autogen.sh
     7      7   
     8      8   # Download TCC
     9      9   tcc_version='0.9.26'
    10     10   tcc_url="http://download.savannah.gnu.org/releases/tinycc/tcc-${tcc_version}.tar.bz2"
    11     11   tcc_sha256='521e701ae436c302545c3f973a9c9b7e2694769c71d9be10f70a2460705b6d71'
           12  +tcc_sha1='7110354d3637d0e05f43a006364c897248aed5d0'
    12     13   (
    13     14   	rm -rf __TMP__
    14     15   	mkdir __TMP__ || exit 1
    15     16   	cd __TMP__ || exit 1
    16     17   
    17     18   	wget -O 'new' "${tcc_url}" || rm -f new
    18         -	new_sha256="$(openssl sha256 new | sed 's@.*= *@@')"
           19  +	new_hash="$(openssl sha256 new 2>/dev/null | sed 's@.*= *@@')"
           20  +
           21  +	if [ -z "${new_hash}" ]; then
           22  +		new_hash="$(openssl sha1 new 2>/dev/null | sed 's@.*= *@@')"
           23  +		check_hash="${tcc_sha1}"
           24  +	else
           25  +		check_hash="${tcc_sha256}"
           26  +	fi
    19     27   
    20         -	if [ "${new_sha256}" != "${tcc_sha256}" ]; then
    21         -		echo "Checksum Mismatch: Downloaded: ${new_sha256}; Expected: ${tcc_sha256}" >&2
           28  +	if [ "${new_hash}" != "${check_hash}" ]; then
           29  +		echo "Checksum Mismatch: Downloaded: ${new_hash}; Expected: ${check_hash}" >&2
    22     30   
    23     31   		rm -f new
    24     32   
    25     33   		exit 1
    26     34   	fi
    27     35   
    28     36   	mv new "tcc-${tcc_version}.tar.bz2"