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

Fix PPA package post-install script #5991

Merged
merged 4 commits into from
Sep 28, 2023
Merged
Changes from 3 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
10 changes: 6 additions & 4 deletions scripts/deployment/debian/postinst
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#!/bin/bash

arch=$(uname -m)
json=$(curl -sSL https://api.github.com/repos/NethermindEth/nethermind/releases/latest)
tag_name=$(echo $json | jq -r '.tag_name')

if [[ $arch == x86_64* ]]; then
curl -s https://api.github.com/repos/NethermindEth/nethermind/releases/latest | jq -r ".assets[] | select(.name) | .browser_download_url" | grep linux-x64 | xargs wget -O nethermind.zip -q
echo $json | jq -r '.assets[].browser_download_url | select(contains("linux-x64"))' | xargs -I % curl -sSL % -o nethermind.zip
ln -s /usr/lib/x86_64-linux-gnu/libdl.so.2 /usr/lib/x86_64-linux-gnu/libdl.so > /dev/null 2>&1
elif [[ $arch == arm* ]] || [[ $arch = aarch64 ]]; then
curl -s https://api.github.com/repos/NethermindEth/nethermind/releases/latest | jq -r ".assets[] | select(.name) | .browser_download_url" | grep linux-arm64 | xargs wget -O nethermind.zip -q
elif [[ $arch == arm* ]] || [[ $arch = aarch64 ]]; then
echo $json | jq -r '.assets[].browser_download_url | select(contains("linux-arm64"))' | xargs -I % curl -sSL % -o nethermind.zip
ln -s /usr/lib/aarch64-linux-gnu/libdl.so.2 /usr/lib/aarch64-linux-gnu/libdl.so > /dev/null 2>&1
apt update > /dev/null 2>&1 && apt install libgflags-dev -y > /dev/null 2>&1
fi
Expand All @@ -17,5 +19,5 @@ mkdir -p /usr/share/nethermind
cp -r nethermind/* /usr/share/nethermind
rm -rf nethermind

wget https://raw.githubusercontent.com/NethermindEth/nethermind/master/scripts/execution.sh -O /usr/bin/nethermind
curl -sSL https://raw.githubusercontent.com/NethermindEth/nethermind/release/$tag_name/scripts/execution.sh -o /usr/bin/nethermind
chmod +x /usr/bin/nethermind
Loading