From ac7997c1178d5e95526d43a725fbd05122531540 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20B=C3=A9dard-Couture?= Date: Wed, 12 Jun 2024 22:13:44 -0400 Subject: [PATCH] Fix download URL and extraction --- install/peanut-install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/install/peanut-install.sh b/install/peanut-install.sh index 5f991eee..a60b7047 100644 --- a/install/peanut-install.sh +++ b/install/peanut-install.sh @@ -32,8 +32,10 @@ $STD apt-get install -y nodejs msg_ok "Installed Node.js" msg_info "Installing Peanut" -wget -qO peanut.tar.gz https://github.com/Brandawg93/PeaNUT/releases/download/$RELEASE/$RELEASE.tar.gz -tar -xzf peanut.tar.gz -C /opt +RELEASE_URL=$(curl -s https://api.github.com/repos/Brandawg93/PeaNUT/releases/latest | grep "tarball_url" | awk '{print substr($2, 2, length($2)-3)}') +wget -qO peanut.tar.gz $RELEASE_URL +mkdir -p /opt/peanut +tar -xzf peanut.tar.gz -C /opt/peanut --strip-components 1 rm peanut.tar.gz cd /opt/peanut npm install -g pnpm