1
0
mirror of https://github.com/billz/raspap-webgui.git synced 2023-10-10 13:37:24 +02:00

Update get_release()

This commit is contained in:
billz 2021-03-10 06:37:12 +00:00
parent 4777da48e6
commit b6e308351f

View File

@ -180,11 +180,11 @@ function _display_welcome() {
# Fetch latest release from GitHub or RaspAP Installer API # Fetch latest release from GitHub or RaspAP Installer API
function _get_release() { function _get_release() {
RASPAP_LATEST=$(curl -s "https://api.github.com/repos/$repo/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")' )
if [ "$insiders" == 1 ]; then if [ "$insiders" == 1 ]; then
RASPAP_INSIDERS_LATEST=$(curl -s "https://install.raspap.com/repos/RaspAP/raspap-insiders/releases/latest/" | grep -Po '"tag_name": "\K.*?(?=")' ) RASPAP_INSIDERS_LATEST=$(curl -s "https://install.raspap.com/repos/RaspAP/raspap-insiders/releases/latest/" | grep -Po '"tag_name": "\K.*?(?=")' )
RASPAP_RELEASE="${RASPAP_INSIDERS_LATEST} Insiders" RASPAP_RELEASE="${RASPAP_INSIDERS_LATEST} Insiders"
else else
RASPAP_LATEST=$(curl -s "https://api.github.com/repos/$repo/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")' )
RASPAP_RELEASE="${RASPAP_LATEST}" RASPAP_RELEASE="${RASPAP_LATEST}"
fi fi
} }