mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
Added usage notes, handle default & known cases
This commit is contained in:
parent
fbcb6c3836
commit
2f0db78955
@ -4,12 +4,18 @@
|
|||||||
# author: @billz
|
# author: @billz
|
||||||
# license: GNU General Public License v3.0
|
# license: GNU General Public License v3.0
|
||||||
#
|
#
|
||||||
# Command-line options: -y, --yes, --assume-yes
|
# Command-line options:
|
||||||
|
# -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, --crt, --certficate
|
||||||
|
# Installs mkcert and generates an SSL certificate for lighttpd
|
||||||
|
|
||||||
UPDATE_URL="https://raw.githubusercontent.com/billz/raspap-webgui/master/"
|
UPDATE_URL="https://raw.githubusercontent.com/billz/raspap-webgui/master/"
|
||||||
VERSION=$(curl -s "https://api.github.com/repos/billz/raspap-webgui/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")' )
|
VERSION=$(curl -s "https://api.github.com/repos/billz/raspap-webgui/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")' )
|
||||||
USAGE="Usage: -y, --yes, --assume-yes, -c --cert"
|
USAGE=$'Usage: raspbian.sh [OPTION] \n\n-y, --yes, --assume-yes\n\tAssumes "yes" as an answer to all prompts'
|
||||||
|
USAGE+=$'\n-c, --crt, --certficate\n\tInstalls an SSL certificate for lighttpd\n'
|
||||||
|
|
||||||
assume_yes=0
|
assume_yes=0
|
||||||
|
|
||||||
while :; do
|
while :; do
|
||||||
@ -17,14 +23,16 @@ while :; do
|
|||||||
-y|--yes|--assume-yes)
|
-y|--yes|--assume-yes)
|
||||||
assume_yes=1
|
assume_yes=1
|
||||||
apt_option="-y"
|
apt_option="-y"
|
||||||
echo "assume_yes"
|
|
||||||
;;
|
;;
|
||||||
-c|--cert)
|
-c|--crt|--certificate)
|
||||||
install_cert=1
|
install_cert=1
|
||||||
echo "install_cert"
|
;;
|
||||||
|
-*|--*)
|
||||||
|
echo "Unknown option: $1";
|
||||||
|
echo "$USAGE"
|
||||||
|
exit 1
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
#echo $USAGE
|
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
Loading…
Reference in New Issue
Block a user