mirror of
https://github.com/certbot/certbot.git
synced 2026-08-03 19:52:34 +02:00
Add CLI parsing
This commit is contained in:
@@ -34,6 +34,10 @@ for arg in "$@" ; do
|
|||||||
# Do not upgrade this script (also prevents client upgrades, because each
|
# Do not upgrade this script (also prevents client upgrades, because each
|
||||||
# copy of the script pins a hash of the python client)
|
# copy of the script pins a hash of the python client)
|
||||||
NO_SELF_UPGRADE=1;;
|
NO_SELF_UPGRADE=1;;
|
||||||
|
--help)
|
||||||
|
HELP=1;;
|
||||||
|
--yes)
|
||||||
|
ASSUME_YES=1;;
|
||||||
--verbose)
|
--verbose)
|
||||||
VERBOSE=1;;
|
VERBOSE=1;;
|
||||||
[!-]*|-*[!v]*|-)
|
[!-]*|-*[!v]*|-)
|
||||||
@@ -81,6 +85,12 @@ else
|
|||||||
SUDO=
|
SUDO=
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $(basename $0) = "letsencrypt-auto" ]; then
|
||||||
|
# letsencrypt-auto does not respect --help or --yes for backwards compatibility
|
||||||
|
ASSUME_YES=1
|
||||||
|
HELP=0
|
||||||
|
fi
|
||||||
|
|
||||||
ExperimentalBootstrap() {
|
ExperimentalBootstrap() {
|
||||||
# Arguments: Platform name, bootstrap function name
|
# Arguments: Platform name, bootstrap function name
|
||||||
if [ "$DEBUG" = 1 ]; then
|
if [ "$DEBUG" = 1 ]; then
|
||||||
|
|||||||
@@ -34,6 +34,10 @@ for arg in "$@" ; do
|
|||||||
# Do not upgrade this script (also prevents client upgrades, because each
|
# Do not upgrade this script (also prevents client upgrades, because each
|
||||||
# copy of the script pins a hash of the python client)
|
# copy of the script pins a hash of the python client)
|
||||||
NO_SELF_UPGRADE=1;;
|
NO_SELF_UPGRADE=1;;
|
||||||
|
--help)
|
||||||
|
HELP=1;;
|
||||||
|
--yes)
|
||||||
|
ASSUME_YES=1;;
|
||||||
--verbose)
|
--verbose)
|
||||||
VERBOSE=1;;
|
VERBOSE=1;;
|
||||||
[!-]*|-*[!v]*|-)
|
[!-]*|-*[!v]*|-)
|
||||||
@@ -81,6 +85,12 @@ else
|
|||||||
SUDO=
|
SUDO=
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $(basename $0) = "letsencrypt-auto" ]; then
|
||||||
|
# letsencrypt-auto does not respect --help or --yes for backwards compatibility
|
||||||
|
ASSUME_YES=1
|
||||||
|
HELP=0
|
||||||
|
fi
|
||||||
|
|
||||||
ExperimentalBootstrap() {
|
ExperimentalBootstrap() {
|
||||||
# Arguments: Platform name, bootstrap function name
|
# Arguments: Platform name, bootstrap function name
|
||||||
if [ "$DEBUG" = 1 ]; then
|
if [ "$DEBUG" = 1 ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user