File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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.
3834ARCH=" $( uname -m) "
3935if [ " $ARCH " = " x86_64" ]; then
@@ -45,16 +41,13 @@ elif [ "$ARCH" = "armv7l" ]; then
4541fi
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 .
5147mkdir -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
5350chmod 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
5851chmod 0600 $HOME /unpackerr/unpackerr.conf
5952
6053# This opens nano, so you may edit unpackerr.conf to suit your needs.
You can’t perform that action at this time.
0 commit comments