From f905434b0b6494c41dbd2e46cebe3f2699554b64 Mon Sep 17 00:00:00 2001 From: billz Date: Wed, 10 Mar 2021 06:27:29 +0000 Subject: [PATCH] Minor: comments + get_release() --- installers/common.sh | 5 +++-- installers/raspbian.sh | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/installers/common.sh b/installers/common.sh index 8b532be3..986822d3 100755 --- a/installers/common.sh +++ b/installers/common.sh @@ -640,9 +640,10 @@ function _optimize_php() { function _install_complete() { _install_log "Installation completed" - echo "Join RaspAP Insiders for access to exclusive features:" + echo "Join RaspAP Insiders for early access to exclusive features!" echo -e "${ANSI_RASPBERRY}" - echo "> https://github.com/sponsors/RaspAP" + echo "> https://docs.raspap.com/insiders/" + echo "> https://github.com/sponsors/RaspAP/" echo -e "${ANSI_RESET}" if [ "$assume_yes" == 0 ]; then # Prompt to reboot if wired ethernet (eth0) is connected. diff --git a/installers/raspbian.sh b/installers/raspbian.sh index f0e2eb4a..031f6d56 100755 --- a/installers/raspbian.sh +++ b/installers/raspbian.sh @@ -15,11 +15,11 @@ # -c, --cert, --certficate Installs mkcert and generates an SSL certificate for lighttpd # -o, --openvpn Used with -y, --yes, sets OpenVPN install option (0=no install) # -a, --adblock Used with -y, --yes, sets Adblock install option (0=no install) -# -r, --repo, --repository Overrides the default GitHub repo (raspap/raspap-webgui) +# -r, --repo, --repository Overrides the default GitHub repo (RaspAP/raspap-webgui) # -b, --branch Overrides the default git branch (master) # -t, --token Specify a GitHub token to access a private repository # -u, --upgrade Upgrades an existing installation to the latest release version -# -i, --insiders Installs from the Insiders Edition (raspap/raspap-insiders) +# -i, --insiders Installs from the Insiders Edition (RaspAP/raspap-insiders) # -v, --version Outputs release info and exits # -h, --help Outputs usage notes and exits # @@ -45,7 +45,7 @@ function _main() { } function _parse_params() { - # default flag values + # default option values assume_yes=0 upgrade=0 ovpn_option=1 @@ -132,11 +132,11 @@ OPTIONS: -c, --cert, --certificate Installs an SSL certificate for lighttpd -o, --openvpn Used with -y, --yes, sets OpenVPN install option (0=no install) -a, --adblock Used with -y, --yes, sets Adblock install option (0=no install) --r, --repo, --repository Overrides the default GitHub repo (raspap/raspap-webgui) +-r, --repo, --repository Overrides the default GitHub repo (RaspAP/raspap-webgui) -b, --branch Overrides the default git branch (latest release) -t, --token Specify a GitHub token to access a private repository -u, --upgrade Upgrades an existing installation to the latest release version --i, --insiders Installs from the Insiders Edition (raspap/raspap-insiders) +-i, --insiders Installs from the Insiders Edition (RaspAP/raspap-insiders) -v, --version Outputs release info and exits -h, --help Outputs usage notes and exits @@ -173,19 +173,19 @@ function _display_welcome() { echo -e " 88 88 88. .88 88 88. .88 88 88 88" echo -e " dP dP 88888P8 88888P 88Y888P 88 88 dP" echo -e " 88" - echo -e " dP version ${RASPAP_RELEASE}" + echo -e " dP version ${RASPAP_RELEASE}" echo -e "${ANSI_GREEN}" echo -e "The Quick Installer will guide you through a few easy steps${ANSI_RESET}\n\n" } # Fetch latest release from GitHub or RaspAP Installer API function _get_release() { - 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://install.raspap.com/repos/RaspAP/raspap-insiders/releases/latest/" | grep -Po '"tag_name": "\K.*?(?=")' ) - RASPAP_RELEASE="${RASPAP_INSIDERS_LATEST} Insiders" + readonly RASPAP_INSIDERS_LATEST=$(curl -s "https://install.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_LATEST=$(curl -s "https://api.github.com/repos/$repo/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")' ) + readonly RASPAP_RELEASE="${RASPAP_LATEST}" fi }