mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-22 03:30:35 +00:00
typo: convert tab to space (#10918)
* typo: convert tab to space Signed-off-by: Delweng <delweng@gmail.com> * typo: indent shell scripts with 4spaces Signed-off-by: Delweng <delweng@gmail.com> * fix the indent typo again Signed-off-by: Delweng <delweng@gmail.com> Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
This commit is contained in:
parent
5291b9d85b
commit
13001cd000
49
prysm.sh
49
prysm.sh
@ -76,13 +76,12 @@ fi
|
|||||||
readonly wrapper_dir="$(dirname "$(get_realpath "${BASH_SOURCE[0]}")")/dist"
|
readonly wrapper_dir="$(dirname "$(get_realpath "${BASH_SOURCE[0]}")")/dist"
|
||||||
|
|
||||||
# for Apple M1s
|
# for Apple M1s
|
||||||
if [ "$(uname -s)" == "Darwin" ] && [ "$(uname -m)" == "arm64" ]
|
if [ "$(uname -s)" == "Darwin" ] && [ "$(uname -m)" == "arm64" ]; then
|
||||||
then
|
arch="amd64"
|
||||||
arch="amd64"
|
|
||||||
else
|
else
|
||||||
arch=$(uname -m)
|
arch=$(uname -m)
|
||||||
arch=${arch/x86_64/amd64}
|
arch=${arch/x86_64/amd64}
|
||||||
arch=${arch/aarch64/arm64}
|
arch=${arch/aarch64/arm64}
|
||||||
fi
|
fi
|
||||||
readonly os_arch_suffix="$(uname -s | tr '[:upper:]' '[:lower:]')-$arch"
|
readonly os_arch_suffix="$(uname -s | tr '[:upper:]' '[:lower:]')-$arch"
|
||||||
|
|
||||||
@ -130,11 +129,11 @@ function verify() {
|
|||||||
fi
|
fi
|
||||||
checkSum="shasum -a 256"
|
checkSum="shasum -a 256"
|
||||||
hash shasum 2>/dev/null || {
|
hash shasum 2>/dev/null || {
|
||||||
checkSum="sha256sum"
|
checkSum="sha256sum"
|
||||||
hash sha256sum 2>/dev/null || {
|
hash sha256sum 2>/dev/null || {
|
||||||
echo >&2 "SHA checksum utility not available. Either install one (shasum or sha256sum) or run with PRYSM_ALLOW_UNVERIFIED_BINARIES=1."
|
echo >&2 "SHA checksum utility not available. Either install one (shasum or sha256sum) or run with PRYSM_ALLOW_UNVERIFIED_BINARIES=1."
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
hash gpg 2>/dev/null || {
|
hash gpg 2>/dev/null || {
|
||||||
echo >&2 "gpg is not available. Either install it or run with PRYSM_ALLOW_UNVERIFIED_BINARIES=1."
|
echo >&2 "gpg is not available. Either install it or run with PRYSM_ALLOW_UNVERIFIED_BINARIES=1."
|
||||||
@ -146,7 +145,7 @@ function verify() {
|
|||||||
gpg --list-keys "$PRYLABS_SIGNING_KEY" >/dev/null 2>&1 || curl --silent https://prysmaticlabs.com/releases/pgp_keys.asc | gpg --import
|
gpg --list-keys "$PRYLABS_SIGNING_KEY" >/dev/null 2>&1 || curl --silent https://prysmaticlabs.com/releases/pgp_keys.asc | gpg --import
|
||||||
(
|
(
|
||||||
cd "$wrapper_dir"
|
cd "$wrapper_dir"
|
||||||
$checkSum -c "${file}.sha256" || failed_verification
|
$checkSum -c "${file}.sha256" || failed_verification
|
||||||
)
|
)
|
||||||
(
|
(
|
||||||
cd "$wrapper_dir"
|
cd "$wrapper_dir"
|
||||||
@ -176,9 +175,9 @@ get_prysm_version
|
|||||||
color "37" "Latest Prysm version is $prysm_version."
|
color "37" "Latest Prysm version is $prysm_version."
|
||||||
|
|
||||||
if [ "${USE_PRYSM_MODERN:=false}" = "true" ]; then
|
if [ "${USE_PRYSM_MODERN:=false}" = "true" ]; then
|
||||||
BEACON_CHAIN_REAL="${wrapper_dir}/beacon-chain-${prysm_version}-modern-${system}-${arch}"
|
BEACON_CHAIN_REAL="${wrapper_dir}/beacon-chain-${prysm_version}-modern-${system}-${arch}"
|
||||||
else
|
else
|
||||||
BEACON_CHAIN_REAL="${wrapper_dir}/beacon-chain-${prysm_version}-${system}-${arch}"
|
BEACON_CHAIN_REAL="${wrapper_dir}/beacon-chain-${prysm_version}-${system}-${arch}"
|
||||||
fi
|
fi
|
||||||
VALIDATOR_REAL="${wrapper_dir}/validator-${prysm_version}-${system}-${arch}"
|
VALIDATOR_REAL="${wrapper_dir}/validator-${prysm_version}-${system}-${arch}"
|
||||||
CLIENT_STATS_REAL="${wrapper_dir}/client-stats-${prysm_version}-${system}-${arch}"
|
CLIENT_STATS_REAL="${wrapper_dir}/client-stats-${prysm_version}-${system}-${arch}"
|
||||||
@ -186,15 +185,15 @@ CLIENT_STATS_REAL="${wrapper_dir}/client-stats-${prysm_version}-${system}-${arch
|
|||||||
if [[ $1 == beacon-chain ]]; then
|
if [[ $1 == beacon-chain ]]; then
|
||||||
if [[ ! -x $BEACON_CHAIN_REAL ]]; then
|
if [[ ! -x $BEACON_CHAIN_REAL ]]; then
|
||||||
color "34" "Downloading beacon chain@${prysm_version} to ${BEACON_CHAIN_REAL} (${reason})"
|
color "34" "Downloading beacon chain@${prysm_version} to ${BEACON_CHAIN_REAL} (${reason})"
|
||||||
if [ "${USE_PRYSM_MODERN}" = "true" ]; then
|
if [ "${USE_PRYSM_MODERN}" = "true" ]; then
|
||||||
file=beacon-chain-${prysm_version}-modern-${system}-${arch}
|
file=beacon-chain-${prysm_version}-modern-${system}-${arch}
|
||||||
else
|
else
|
||||||
file=beacon-chain-${prysm_version}-${system}-${arch}
|
file=beacon-chain-${prysm_version}-${system}-${arch}
|
||||||
fi
|
fi
|
||||||
res=$(curl -w '%{http_code}\n' -f -L "https://prysmaticlabs.com/releases/${file}" -o "$BEACON_CHAIN_REAL" | ( grep 404 || true ) )
|
res=$(curl -w '%{http_code}\n' -f -L "https://prysmaticlabs.com/releases/${file}" -o "$BEACON_CHAIN_REAL" | ( grep 404 || true ) )
|
||||||
if [[ $res == 404 ]];then
|
if [[ $res == 404 ]];then
|
||||||
echo "No prysm beacon chain found for ${prysm_version},(${file}) exit"
|
echo "No prysm beacon chain found for ${prysm_version},(${file}) exit"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
curl --silent -L "https://prysmaticlabs.com/releases/${file}.sha256" -o "${wrapper_dir}/${file}.sha256"
|
curl --silent -L "https://prysmaticlabs.com/releases/${file}.sha256" -o "${wrapper_dir}/${file}.sha256"
|
||||||
curl --silent -L "https://prysmaticlabs.com/releases/${file}.sig" -o "${wrapper_dir}/${file}.sig"
|
curl --silent -L "https://prysmaticlabs.com/releases/${file}.sig" -o "${wrapper_dir}/${file}.sig"
|
||||||
@ -211,8 +210,8 @@ if [[ $1 == validator ]]; then
|
|||||||
file=validator-${prysm_version}-${system}-${arch}
|
file=validator-${prysm_version}-${system}-${arch}
|
||||||
res=$(curl -w '%{http_code}\n' -f -L "https://prysmaticlabs.com/releases/${file}" -o "$VALIDATOR_REAL" | ( grep 404 || true ) )
|
res=$(curl -w '%{http_code}\n' -f -L "https://prysmaticlabs.com/releases/${file}" -o "$VALIDATOR_REAL" | ( grep 404 || true ) )
|
||||||
if [[ $res == 404 ]];then
|
if [[ $res == 404 ]];then
|
||||||
echo "No prysm validator found for ${prysm_version}, (${file}) exit"
|
echo "No prysm validator found for ${prysm_version}, (${file}) exit"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
curl --silent -L "https://prysmaticlabs.com/releases/${file}.sha256" -o "${wrapper_dir}/${file}.sha256"
|
curl --silent -L "https://prysmaticlabs.com/releases/${file}.sha256" -o "${wrapper_dir}/${file}.sha256"
|
||||||
curl --silent -L "https://prysmaticlabs.com/releases/${file}.sig" -o "${wrapper_dir}/${file}.sig"
|
curl --silent -L "https://prysmaticlabs.com/releases/${file}.sig" -o "${wrapper_dir}/${file}.sig"
|
||||||
@ -229,8 +228,8 @@ if [[ $1 == client-stats ]]; then
|
|||||||
file=client-stats-${prysm_version}-${system}-${arch}
|
file=client-stats-${prysm_version}-${system}-${arch}
|
||||||
res=$(curl -w '%{http_code}\n' -f -L "https://prysmaticlabs.com/releases/${file}" -o "$CLIENT_STATS_REAL" | ( grep 404 || true ) )
|
res=$(curl -w '%{http_code}\n' -f -L "https://prysmaticlabs.com/releases/${file}" -o "$CLIENT_STATS_REAL" | ( grep 404 || true ) )
|
||||||
if [[ $res == 404 ]];then
|
if [[ $res == 404 ]];then
|
||||||
echo "No prysm client stats found for ${prysm_version},(${file}) exit"
|
echo "No prysm client stats found for ${prysm_version},(${file}) exit"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
curl --silent -L "https://prysmaticlabs.com/releases/${file}.sha256" -o "${wrapper_dir}/${file}.sha256"
|
curl --silent -L "https://prysmaticlabs.com/releases/${file}.sha256" -o "${wrapper_dir}/${file}.sha256"
|
||||||
curl --silent -L "https://prysmaticlabs.com/releases/${file}.sig" -o "${wrapper_dir}/${file}.sig"
|
curl --silent -L "https://prysmaticlabs.com/releases/${file}.sig" -o "${wrapper_dir}/${file}.sig"
|
||||||
|
Loading…
Reference in New Issue
Block a user