Skip to content

Commit ea349ad

Browse files
authored
Refactor seedbox installation script for latest release
Updated the installation script to fetch the latest release URL directly instead of using the release tag. Also modified the download process to include the example config file.
1 parent 2d65270 commit ea349ad

1 file changed

Lines changed: 4 additions & 11 deletions

File tree

‎docs/install/seedbox.md‎

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ works if you use this solution. Please read and understand what the script does
3030
```bash
3131
#!/bin/bash
3232

33-
# Get the latest release tag from GitHub API.
34-
TAG=$(curl -s https://api.github.com/repos/Unpackerr/unpackerr/releases/latest | \
35-
grep "tag_name" | cut -d '"' -f 4)
36-
3733
# Check system architecture and assign it to ARCH variable.
3834
ARCH="$(uname -m)"
3935
if [ "$ARCH" = "x86_64" ]; then
@@ -45,16 +41,13 @@ elif [ "$ARCH" = "armv7l" ]; then
4541
fi
4642

4743
# Construct the download URL.
48-
URL="https://github.com/Unpackerr/unpackerr/releases/download/$TAG/unpackerr.${ARCH}.linux.gz"
44+
URL=$(curl -s https://api.github.com/repos/Unpackerr/unpackerr/releases/latest | grep -e "browser_download_url.*linux_$ARCH"| cut -d '"' -f 4)
4945

50-
# Download and extract the binary.
46+
# Download and extract the binary and the example config file.
5147
mkdir -p $HOME/unpackerr
52-
wget $URL -O - | gunzip > $HOME/unpackerr/unpackerr
48+
wget -qO- "$URL" | tar xzf - -C "$HOME/unpackerr" unpackerr unpackerr.conf.example
49+
mv $HOME/unpackerr/unpackerr.conf.example $HOME/unpackerr/unpackerr.conf
5350
chmod 0755 $HOME/unpackerr/unpackerr
54-
55-
# Download the example config file from the same tag.
56-
wget https://raw.githubusercontent.com/Unpackerr/unpackerr/$TAG/examples/unpackerr.conf.example \
57-
-O $HOME/unpackerr/unpackerr.conf
5851
chmod 0600 $HOME/unpackerr/unpackerr.conf
5952

6053
# This opens nano, so you may edit unpackerr.conf to suit your needs.

0 commit comments

Comments
 (0)