mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
speedo: Allow use of SHA-256 checksums
* build-aux/getswdb.sh: Add option --find-sha256sum. * build-aux/speedo.mk (libgpg_error_sha2): New var. Also for all other packages. (SHA2SUM): New. (SETVARS, SETVARS_W64): Prefer sha256sum over sha1sum. (installer-from-source): Create swdb fragment. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
12c665b36c
commit
039a55716b
3 changed files with 74 additions and 3 deletions
|
@ -37,6 +37,7 @@ Options:
|
|||
--skip-verify Do not check signatures
|
||||
--skip-selfcheck Do not check GnuPG version
|
||||
--find-sha1sum Print the name of the sha1sum utility
|
||||
--find-sha256sum Print the name of the sha256sum utility
|
||||
--help Print this help.
|
||||
EOF
|
||||
exit $1
|
||||
|
@ -49,6 +50,7 @@ skip_download=no
|
|||
skip_verify=no
|
||||
skip_selfcheck=no
|
||||
find_sha1sum=no
|
||||
find_sha256sum=no
|
||||
while test $# -gt 0; do
|
||||
case "$1" in
|
||||
# Set up `optarg'.
|
||||
|
@ -76,6 +78,9 @@ while test $# -gt 0; do
|
|||
--find-sha1sum)
|
||||
find_sha1sum=yes
|
||||
;;
|
||||
--find-sha256sum)
|
||||
find_sha256sum=yes
|
||||
;;
|
||||
*)
|
||||
usage 1 1>&2
|
||||
;;
|
||||
|
@ -96,6 +101,21 @@ if [ ${find_sha1sum} = yes ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# Mac OSX has only a shasum and not sha256sum
|
||||
if [ ${find_sha256sum} = yes ]; then
|
||||
for i in 'shasum -a 256' sha256sum ; do
|
||||
tmp=$($i </dev/null 2>/dev/null | cut -d ' ' -f1)
|
||||
tmp2="e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
if [ x"$tmp" = x"$tmp2" ]; then
|
||||
echo "$i"
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
echo "false"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# Get GnuPG version from VERSION file. For a GIT checkout this means
|
||||
# that ./autogen.sh must have been run first. For a regular tarball
|
||||
# VERSION is always available.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue