bugfix
This commit is contained in:
parent
475a4d9b8b
commit
effb4a30d4
@ -40,26 +40,12 @@ git checkout main
|
||||
git branch -D release
|
||||
git pull
|
||||
git checkout release
|
||||
echo "✅ Downloaded the latest changes successfully."
|
||||
echo "✅ Github repo updated to the latest changes successfully."
|
||||
echo
|
||||
|
||||
get_os_arch() {
|
||||
local os=$(uname -s | tr '[:upper:]' '[:lower:]')
|
||||
local arch=$(uname -m)
|
||||
|
||||
case "$os" in
|
||||
linux|darwin) ;;
|
||||
*) echo "Unsupported operating system: $os" >&2; return 1 ;;
|
||||
esac
|
||||
|
||||
case "$arch" in
|
||||
x86_64|amd64) arch="amd64" ;;
|
||||
arm64|aarch64) arch="arm64" ;;
|
||||
*) echo "Unsupported architecture: $arch" >&2; return 1 ;;
|
||||
esac
|
||||
|
||||
echo "${os}-${arch}"
|
||||
}
|
||||
#==========================
|
||||
# NODE BINARY DOWNLOAD
|
||||
#==========================
|
||||
|
||||
get_os_arch() {
|
||||
local os=$(uname -s | tr '[:upper:]' '[:lower:]')
|
||||
@ -79,16 +65,15 @@ get_os_arch() {
|
||||
echo "${os}-${arch}"
|
||||
}
|
||||
|
||||
# Base URL for the Quilibrium releases
|
||||
RELEASE_FILES_URL="https://releases.quilibrium.com/release"
|
||||
|
||||
cd ~/ceremonyclient/node
|
||||
|
||||
# Get the current OS and architecture
|
||||
OS_ARCH=$(get_os_arch)
|
||||
|
||||
# Base URL for the Quilibrium releases
|
||||
RELEASE_FILES_URL="https://releases.quilibrium.com/release"
|
||||
|
||||
# Fetch the list of files from the release page
|
||||
RELEASE_FILES=$(curl -s $RELEASE_FILES_URL | grep -oE "node-[0-9]+\.[0-9]+\.[0-9]+-${OS_ARCH}(\.dgst)?(\.sig\.[0-9]+)?")
|
||||
# Updated regex to allow for an optional fourth version number
|
||||
RELEASE_FILES=$(curl -s $RELEASE_FILES_URL | grep -oE "node-[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?-${OS_ARCH}(\.dgst)?(\.sig\.[0-9]+)?")
|
||||
|
||||
# Change to the download directory
|
||||
cd ~/ceremonyclient/node
|
||||
@ -96,13 +81,13 @@ cd ~/ceremonyclient/node
|
||||
# Download each file
|
||||
for file in $RELEASE_FILES; do
|
||||
echo "Downloading $file..."
|
||||
wget "https://releases.quilibrium.com/$file"
|
||||
curl -L -o "$file" "https://releases.quilibrium.com/$file"
|
||||
|
||||
# Check if the download was successful
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Successfully downloaded $file"
|
||||
# Check if the file is the base binary (without .dgst or .sig suffix)
|
||||
if [[ $file =~ ^node-[0-9]+\.[0-9]+\.[0-9]+-${OS_ARCH}$ ]]; then
|
||||
if [[ $file =~ ^node-[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?-${OS_ARCH}$ ]]; then
|
||||
echo "Making $file executable..."
|
||||
chmod +x "$file"
|
||||
if [ $? -eq 0 ]; then
|
||||
@ -118,7 +103,7 @@ for file in $RELEASE_FILES; do
|
||||
echo "------------------------"
|
||||
done
|
||||
|
||||
echo "Download process completed."
|
||||
echo "✅ Node binary download completed."
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user