From 9399e342a366b2f4677775260e8a097ecf770600 Mon Sep 17 00:00:00 2001 From: Daniel Jones Date: Wed, 9 Oct 2024 10:21:17 -0500 Subject: [PATCH 1/3] Adding changes for rpm and use of all architecture for profiles --- .gitignore | 2 ++ heimdall.sh | 16 ++++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9da1403 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.idea/ +.idea* \ No newline at end of file diff --git a/heimdall.sh b/heimdall.sh index e6b85eb..2d1f41b 100755 --- a/heimdall.sh +++ b/heimdall.sh @@ -58,10 +58,10 @@ if [ ! -z "$1" ]; then fi if [ ! -z "$2" ]; then - if [ "$2" = "mainnet" ] || [ "$2" = "mumbai" ] || [ "$2" = "amoy" ]; then + if [ "$2" = "mainnet" ] || [ "$2" = "amoy" ]; then network="$2" else - echo "Invalid network: $2, choose from 'mainnet' or 'mumbai' or 'amoy'" + echo "Invalid network: $2, choose from 'mainnet' or 'amoy'" exit 1 fi fi @@ -97,15 +97,15 @@ case "$(uname -s).$(uname -m)" in type="deb" if [[ $version > "0.3" ]]; then binary="heimdalld-v${tag}-amd64.deb" - profile="heimdalld-${profileInfo}-amd64.deb" + profile="heimdalld-${profileInfo}-all.deb" else binary="heimdalld_v${tag}_linux_amd64.deb" fi elif command -v rpm &> /dev/null; then type="rpm" if [[ $version > "0.3" ]]; then - binary="heimdalld-v${tag}-amd64.rpm" - profile="heimdalld-${profileInfo}-amd64.rpm" + binary="heimdalld-v${tag}.x86_64.rpm" + profile="heimdalld-${profileInfo}.noarch.rpm" else binary="heimdalld_v${tag}_linux_amd64.rpm" fi @@ -128,15 +128,15 @@ case "$(uname -s).$(uname -m)" in type="deb" if [[ $version > "0.3" ]]; then binary="heimdalld-v${tag}-arm64.deb" - profile="heimdalld-${profileInfo}-arm64.deb" + profile="heimdalld-${profileInfo}-all.deb" else binary="heimdalld_v${tag}_linux_arm64.deb" fi elif command -v rpm &> /dev/null; then type="rpm" if [[ $version > "0.3" ]]; then - binary="heimdalld-v${tag}-arm64.rpm" - profile="heimdalld-${profileInfo}-arm64.rpm" + binary="heimdalld-v${tag}.aarch64.rpm" + profile="heimdalld-${profileInfo}.noarch.rpm" else binary="heimdalld_v${tag}_linux_arm64.rpm" fi From ef5f3268c6d8f152a56dbe38b751db4021f26efc Mon Sep 17 00:00:00 2001 From: Daniel Jones Date: Wed, 9 Oct 2024 13:27:11 -0500 Subject: [PATCH 2/3] Updating to reflect changes after testing --- heimdall.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/heimdall.sh b/heimdall.sh index 2d1f41b..a7a3609 100755 --- a/heimdall.sh +++ b/heimdall.sh @@ -96,18 +96,18 @@ case "$(uname -s).$(uname -m)" in if command -v dpkg &> /dev/null; then type="deb" if [[ $version > "0.3" ]]; then - binary="heimdalld-v${tag}-amd64.deb" - profile="heimdalld-${profileInfo}-all.deb" + binary="heimdall-v${tag}-amd64.deb" + profile="heimdall-${profileInfo}-all.deb" else - binary="heimdalld_v${tag}_linux_amd64.deb" + binary="heimdall_v${tag}_linux_amd64.deb" fi elif command -v rpm &> /dev/null; then type="rpm" if [[ $version > "0.3" ]]; then - binary="heimdalld-v${tag}.x86_64.rpm" - profile="heimdalld-${profileInfo}.noarch.rpm" + binary="heimdall-v${tag}.x86_64.rpm" + profile="heimdall-${profileInfo}.noarch.rpm" else - binary="heimdalld_v${tag}_linux_amd64.rpm" + binary="heimdall_v${tag}_linux_amd64.rpm" fi elif command -v apk &> /dev/null; then if [[ $version > "0.3" ]]; then @@ -127,25 +127,25 @@ case "$(uname -s).$(uname -m)" in if command -v dpkg &> /dev/null; then type="deb" if [[ $version > "0.3" ]]; then - binary="heimdalld-v${tag}-arm64.deb" - profile="heimdalld-${profileInfo}-all.deb" + binary="heimdall-v${tag}-arm64.deb" + profile="heimdall-${profileInfo}-all.deb" else - binary="heimdalld_v${tag}_linux_arm64.deb" + binary="heimdall_v${tag}_linux_arm64.deb" fi elif command -v rpm &> /dev/null; then type="rpm" if [[ $version > "0.3" ]]; then - binary="heimdalld-v${tag}.aarch64.rpm" - profile="heimdalld-${profileInfo}.noarch.rpm" + binary="heimdall-v${tag}.aarch64.rpm" + profile="heimdall-${profileInfo}.noarch.rpm" else - binary="heimdalld_v${tag}_linux_arm64.rpm" + binary="heimdall_v${tag}_linux_arm64.rpm" fi elif command -v apk &> /dev/null; then if [[ $version > "0.3" ]]; then oops "sorry, there is no binary distribution for your platform" fi type="apk" - binary="heimdalld_v${tag}_linux_arm64.apk" + binary="heimdall_v${tag}_linux_arm64.apk" else if [[ $version > "0.3" ]]; then oops "sorry, there is no binary distribution for your platform" From 8cb28471fc8611dd15d2a18b04d48d68f0a8e8d5 Mon Sep 17 00:00:00 2001 From: Daniel Jones Date: Wed, 9 Oct 2024 13:52:14 -0500 Subject: [PATCH 3/3] Updated profile info for rpm to address naming --- heimdall.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/heimdall.sh b/heimdall.sh index a7a3609..72536fd 100755 --- a/heimdall.sh +++ b/heimdall.sh @@ -82,6 +82,7 @@ fi if [[ $version > "0.3" ]]; then tag=${version} profileInfo=${network}-${nodetype}-config_v${version} + profileInforpm=${network}-${nodetype}-config-v${version} else echo "Version is less than 0.3, ignoring network and node type" tag=${version} @@ -105,7 +106,7 @@ case "$(uname -s).$(uname -m)" in type="rpm" if [[ $version > "0.3" ]]; then binary="heimdall-v${tag}.x86_64.rpm" - profile="heimdall-${profileInfo}.noarch.rpm" + profile="heimdall-${profileInforpm}.noarch.rpm" else binary="heimdall_v${tag}_linux_amd64.rpm" fi @@ -136,7 +137,7 @@ case "$(uname -s).$(uname -m)" in type="rpm" if [[ $version > "0.3" ]]; then binary="heimdall-v${tag}.aarch64.rpm" - profile="heimdall-${profileInfo}.noarch.rpm" + profile="heimdall-${profileInforpm}.noarch.rpm" else binary="heimdall_v${tag}_linux_arm64.rpm" fi