Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial update for bor updates #19

Merged
merged 5 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ Simply pass the version tag as the first argument to the installation script. No
./bor.sh 0.2.14-tmp-span-hotfix
```

#### Installing PBSS profiles
```shell
./bor.sh $version $network pbss-$network-$type
```
Where $version is desired version, $network is mainnet or amoy, and $type is defined as sentry or validator as PBSS does not support bootnode or archive.



### Heimdall

Expand Down
21 changes: 11 additions & 10 deletions bor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,26 +57,27 @@ 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

if [ ! -z "$3" ]; then
if [ "$3" = "sentry" ] || [ "$3" = "validator" ] || [ "$3" = "archive" ] || [ "$3" = "bootnode" ]; then
if [ "$3" = "sentry" ] || [ "$3" = "pbss-$2-sentry" ] || [ "$3" = "validator" ] || [ "$3" = "pbss-$2-validator" ] || [ "$3" = "archive" ] || [ "$3" = "bootnode" ]; then
nodetype="$3"
else
echo "Invalid node type: $3, choose from 'sentry', 'validator', 'archive', or 'bootnode'"
echo "Invalid node type: $3, choose from 'sentry', 'pbss-$2-sentry', 'validator', 'pbss-$2-validator', 'archive', or 'bootnode'"
exit 1
fi
fi

if [[ $version > "0.3" ]]; then
tag=v${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}
Expand All @@ -92,15 +93,15 @@ case "$(uname -s).$(uname -m)" in
type="deb"
if [[ $version > "0.3" ]]; then
binary="bor-${tag}-amd64.deb"
profile="bor-${profileInfo}-amd64.deb"
profile="bor-${profileInfo}-all.deb"
else
binary="bor_${tag}_linux_amd64.deb"
fi
elif command -v rpm &> /dev/null; then
type="rpm"
if [[ $version > "0.3" ]]; then
binary="bor-${tag}-amd64.rpm"
profile="bor-${profileInfo}-amd64.rpm"
binary="bor-${tag}.x86_64.rpm"
profile="bor-${profileInforpm}.noarch.rpm"
else
binary="bor_${tag}_linux_amd64.rpm"
fi
Expand All @@ -123,15 +124,15 @@ case "$(uname -s).$(uname -m)" in
type="deb"
if [[ $version > "0.3" ]]; then
binary="bor-${tag}-arm64.deb"
profile="bor-${profileInfo}-arm64.deb"
profile="bor-${profileInfo}-all.deb"
else
binary="bor_${tag}_linux_arm64.deb"
fi
elif command -v rpm &> /dev/null; then
type="rpm"
if [[ $version > "0.3" ]]; then
binary="bor-${tag}-arm64.rpm"
profile="bor-${profileInfo}-arm64.rpm"
binary="bor-${tag}.aarch64.rpm"
profile="bor-${profileInforpm}.noarch.rpm"
else
binary="bor_${tag}_linux_arm64.rpm"
fi
Expand Down
Loading