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

Minor: add comments for clarity

This commit is contained in:
billz 2019-12-09 12:07:57 +00:00
parent c94e3edd88
commit 0d92cb636f

View File

@ -4,7 +4,8 @@
# author: @billz # author: @billz
# license: GNU General Public License v3.0 # license: GNU General Public License v3.0
# #
# Command-line options: # Usage:
#
# -y, --yes, --assume-yes # -y, --yes, --assume-yes
# Assume "yes" as answer to all prompts and run non-interactively # Assume "yes" as answer to all prompts and run non-interactively
# c, --cert, --certficate # c, --cert, --certficate
@ -20,11 +21,14 @@
# -v, --version # -v, --version
# Outputs release info and exits # Outputs release info and exits
# Set defaults
repo="billz/raspap-webgui" repo="billz/raspap-webgui"
branch="master" branch="master"
VERSION=$(curl -s "https://api.github.com/repos/$repo/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")' ) VERSION=$(curl -s "https://api.github.com/repos/$repo/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")' )
assume_yes=0 assume_yes=0
ovpn_option=1 ovpn_option=1
# Define usage notes
usage=$(cat << EOF usage=$(cat << EOF
Usage: raspbian.sh [OPTION]\n Usage: raspbian.sh [OPTION]\n
-y, --yes, --assume-yes\n\tAssumes "yes" as an answer to all prompts -y, --yes, --assume-yes\n\tAssumes "yes" as an answer to all prompts
@ -37,6 +41,7 @@ Usage: raspbian.sh [OPTION]\n
EOF EOF
) )
# Parse command-line options
while :; do while :; do
case $1 in case $1 in
-y|--yes|--assume-yes) -y|--yes|--assume-yes)
@ -124,6 +129,7 @@ function update_system_packages() {
sudo apt-get update || install_error "Unable to update package list" sudo apt-get update || install_error "Unable to update package list"
} }
# Fetch required installer functions
if [ "${install_cert:-}" = 1 ]; then if [ "${install_cert:-}" = 1 ]; then
source="mkcert" source="mkcert"
wget -q ${UPDATE_URL}installers/${source}.sh -O /tmp/raspap_${source}.sh wget -q ${UPDATE_URL}installers/${source}.sh -O /tmp/raspap_${source}.sh