diff --git a/ethpillar.sh b/ethpillar.sh index 85d79ee..7bc551e 100755 --- a/ethpillar.sh +++ b/ethpillar.sh @@ -670,7 +670,7 @@ while true; do test -f /etc/systemd/system/consensus.service && _CL=$(curl -s -X GET "${API_BN_ENDPOINT}/eth/v1/node/version" -H "accept: application/json" | jq -r '.data.version') test -f /etc/systemd/system/execution.service && _EL=$(curl -s -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":2}' "${EL_RPC_ENDPOINT}" | jq -r '.result') [[ $EL == "Erigon-Caplin" ]] && _CL=$(curl -s -X GET "${API_BN_ENDPOINT}/eth/v1/node/version" -H "accept: application/json" | jq -r '.data.version') - _MB=$(if [[ -f /etc/systemd/system/mevboost.service ]]; then printf "Mev-boost: $(mev-boost --version 2>&1 | sed 's/.*\s\([0-9]*\.[0-9]*\).*/\1/')"; else printf "Mev-boost: Not Installed"; fi) + _MB=$(if [[ -f /etc/systemd/system/mevboost.service ]]; then printf "Mev-boost: $(mev-boost --version 2>&1 | sed -E 's/.*([0-9]+\.[0-9]+\.[0-9]+).*/\1/')"; else printf "Mev-boost: Not Installed"; fi) if [[ -z $_CL ]] ; then _CL="Not installed or still starting up." fi diff --git a/update_mevboost.sh b/update_mevboost.sh index 3085bce..c2b4ada 100755 --- a/update_mevboost.sh +++ b/update_mevboost.sh @@ -22,7 +22,7 @@ function getCurrentVersion(){ #Find version in format #.#.# if [[ $INSTALLED ]] ; then # shellcheck disable=SC2001 - VERSION=$(echo "$INSTALLED" | sed 's/.*\s\([0-9]*\.[0-9]*\).*/\1/') + VERSION=$(echo "$INSTALLED" | sed -E 's/.*([0-9]+\.[0-9]+\.[0-9]+).*/\1/') else VERSION="Client not installed." fi @@ -82,7 +82,7 @@ function promptViewLogs(){ function getLatestVersion(){ TAG_URL="https://api.github.com/repos/flashbots/mev-boost/releases/latest" #Get tag name and remove leading 'v' - TAG=$(curl -s $TAG_URL | jq -r .tag_name | sed 's/.*v\([0-9]*\.[0-9]*\).*/\1/') + TAG=$(curl -s $TAG_URL | jq -r .tag_name | sed -E 's/.*([0-9]+\.[0-9]+\.[0-9]+).*/\1/') # Exit in case of null tag [[ -z $TAG ]] || [[ $TAG == "null" ]] && echo "ERROR: Couldn't find the latest version tag" && exit 1 CHANGES_URL="https://github.com/flashbots/mev-boost/releases"