fix git url errors
This commit is contained in:
@ -14,6 +14,9 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
|
APPLICATION="huntarr"
|
||||||
|
SPINNER_PID=0
|
||||||
|
|
||||||
# Installing Dependencies
|
# Installing Dependencies
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y \
|
||||||
@ -24,10 +27,13 @@ msg_ok "Installed Dependencies"
|
|||||||
|
|
||||||
# Setup App
|
# Setup App
|
||||||
msg_info "Setup ${APPLICATION}"
|
msg_info "Setup ${APPLICATION}"
|
||||||
RELEASE=$(curl -fsSL https://api.github.com/repos/plexguide/Huntarr.io/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}')
|
LATEST_JSON=$(curl -fsSL https://api.github.com/repos/plexguide/Huntarr.io/releases/latest)
|
||||||
|
RELEASE=$(echo "$LATEST_JSON" | grep '"tag_name":' | head -1 | cut -d '"' -f4)
|
||||||
|
DOWNLOAD_URL=$(echo "$LATEST_JSON" | grep 'browser_download_url' | grep linux_amd64.tar.gz | cut -d '"' -f4)
|
||||||
|
TAR_FILE=$(basename "$DOWNLOAD_URL")
|
||||||
mkdir -p /opt/${APPLICATION}
|
mkdir -p /opt/${APPLICATION}
|
||||||
curl -fsSL -o "/opt/${APPLICATION}/${APPLICATION}_${RELEASE}_linux_amd64.tar.gz" "https://github.com/plexguide/Huntarr.io/releases/download/${RELEASE}/${APPLICATION}_${RELEASE}_linux_amd64.tar.gz"
|
curl -fsSL -o "/opt/${APPLICATION}/${TAR_FILE}" "$DOWNLOAD_URL"
|
||||||
tar -xzf "/opt/${APPLICATION}/${APPLICATION}_${RELEASE}_linux_amd64.tar.gz" -C /opt/${APPLICATION}
|
tar -xzf "/opt/${APPLICATION}/${TAR_FILE}" -C /opt/${APPLICATION}
|
||||||
chmod +x /opt/${APPLICATION}/${APPLICATION}
|
chmod +x /opt/${APPLICATION}/${APPLICATION}
|
||||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||||
msg_ok "Setup ${APPLICATION}"
|
msg_ok "Setup ${APPLICATION}"
|
||||||
@ -55,7 +61,7 @@ customize
|
|||||||
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
msg_info "Cleaning up"
|
msg_info "Cleaning up"
|
||||||
rm -f ${RELEASE}.zip
|
rm -f "/opt/${APPLICATION}/${TAR_FILE}"
|
||||||
$STD apt-get -y autoremove
|
$STD apt-get -y autoremove
|
||||||
$STD apt-get -y autoclean
|
$STD apt-get -y autoclean
|
||||||
msg_ok "Cleaned"
|
msg_ok "Cleaned"
|
||||||
|
|||||||
Reference in New Issue
Block a user