Changeset View
Changeset View
Standalone View
Standalone View
contrib/verifybinaries/verify.sh
#!/usr/bin/env bash | #!/usr/bin/env bash | ||||
# Copyright (c) 2016 The Bitcoin Core developers | # Copyright (c) 2016 The Bitcoin Core developers | ||||
# Distributed under the MIT software license, see the accompanying | # Distributed under the MIT software license, see the accompanying | ||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | # file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
### This script attempts to download the signature file SHA256SUMS.asc from bitcoin.org | ### This script attempts to download the signature file SHA256SUMS.asc from bitcoin.org | ||||
### It first checks if the signature passes, and then downloads the files specified in | ### It first checks if the signature passes, and then downloads the files specified in | ||||
### the file, and checks if the hashes of these files match those that are specified | ### the file, and checks if the hashes of these files match those that are specified | ||||
### in the signature file. | ### in the signature file. | ||||
### The script returns 0 if everything passes the checks. It returns 1 if either the | ### The script returns 0 if everything passes the checks. It returns 1 if either the | ||||
### signature check or the hash check doesn't pass. If an error occurs the return value is 2 | ### signature check or the hash check doesn't pass. If an error occurs the return value is 2 | ||||
export LC_ALL=C | |||||
function clean_up { | function clean_up { | ||||
for file in "$@" | for file in "$@" | ||||
do | do | ||||
rm "$file" 2> /dev/null | rm "$file" 2> /dev/null | ||||
done | done | ||||
} | } | ||||
WORKINGDIR="/tmp/bitcoin_verify_binaries" | WORKINGDIR="/tmp/bitcoin_verify_binaries" | ||||
▲ Show 20 Lines • Show All 104 Lines • Show Last 20 Lines |