From 1485d4509e75927bee022ff799af2e60d57cc396 Mon Sep 17 00:00:00 2001 From: billz Date: Sat, 27 Mar 2021 13:11:44 +0000 Subject: [PATCH] Set repo with --insiders option --- installers/raspbian.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/installers/raspbian.sh b/installers/raspbian.sh index 2750ff13..d056062c 100755 --- a/installers/raspbian.sh +++ b/installers/raspbian.sh @@ -181,12 +181,13 @@ function _display_welcome() { # Fetch latest release from GitHub or RaspAP Installer API function _get_release() { - RASPAP_LATEST=$(curl -s "https://api.github.com/repos/$repo/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")' ) + readonly RASPAP_LATEST=$(curl -s "https://api.github.com/repos/$repo/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")' ) if [ "$insiders" == 1 ]; then - RASPAP_INSIDERS_LATEST=$(curl -s "https://api.raspap.com/repos/RaspAP/raspap-insiders/releases/latest/" | grep -Po '"tag_name": "\K.*?(?=")' ) - RASPAP_RELEASE="${RASPAP_INSIDERS_LATEST} Insiders" + repo="RaspAP/raspap-insiders" + readonly RASPAP_INSIDERS_LATEST=$(curl -s "https://api.raspap.com/repos/RaspAP/raspap-insiders/releases/latest/" | grep -Po '"tag_name": "\K.*?(?=")' ) + readonly RASPAP_RELEASE="${RASPAP_INSIDERS_LATEST} Insiders" else - RASPAP_RELEASE="${RASPAP_LATEST}" + readonly RASPAP_RELEASE="${RASPAP_LATEST}" fi }