File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ if [ "$(uname)" == "Darwin" ]; then
127127 ;;
128128 * ) echo Did not recognize arch-plat $arch -$plat ; return 1 ;;
129129 esac
130- if [[ " $( sha256sum gfortran-darwin-${arch} -${type} .tar.gz) " != " ${GFORTRAN_SHA} gfortran-darwin-${arch} -${type} .tar.gz" ]]; then
130+ if [[ " $( python3 tools/ sha256sum.py gfortran-darwin-${arch} -${type} .tar.gz) " != " ${GFORTRAN_SHA} gfortran-darwin-${arch} -${type} .tar.gz" ]]; then
131131 echo " shasum mismatch for gfortran-darwin-${arch} -${type} "
132132 exit 1
133133 fi
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python3
2+
3+ import hashlib
4+ import sys
5+
6+ filename = sys .argv [1 ]
7+ sha256_hash = hashlib .sha256 ()
8+ with open (filename ,"rb" ) as f :
9+ # Read and update hash string value in blocks
10+ for byte_block in iter (lambda : f .read (32768 ),b"" ):
11+ sha256_hash .update (byte_block )
12+ print (sha256_hash .hexdigest ())
13+
You can’t perform that action at this time.
0 commit comments