fix auto arg parsing

This commit is contained in:
Brad Warren
2016-05-16 15:06:51 -07:00
parent 8f696b3ad7
commit d39dee20ad
2 changed files with 24 additions and 23 deletions
+13 -12
View File
@@ -38,17 +38,6 @@ Help for certbot itself cannot be provided until it is installed.
All arguments are accepted and forwarded to the Certbot client when run." All arguments are accepted and forwarded to the Certbot client when run."
while getopts ":hnv" arg; do
case $arg in
h)
HELP=1;;
n)
ASSUME_YES=1;;
v)
VERBOSE=1;;
esac
done
for arg in "$@" ; do for arg in "$@" ; do
case "$arg" in case "$arg" in
--debug) --debug)
@@ -65,6 +54,17 @@ for arg in "$@" ; do
ASSUME_YES=1;; ASSUME_YES=1;;
--verbose) --verbose)
VERBOSE=1;; VERBOSE=1;;
-[!-]*)
while getopts ":hnv" short_arg $arg; do
case "$short_arg" in
h)
HELP=1;;
n)
ASSUME_YES=1;;
v)
VERBOSE=1;;
esac
done;;
esac esac
done done
@@ -435,7 +435,8 @@ BootstrapMac() {
# Workaround for _dlopen not finding augeas on OS X # Workaround for _dlopen not finding augeas on OS X
if [ "$pkgman" = "port" ] && ! [ -e "/usr/local/lib/libaugeas.dylib" ] && [ -e "/opt/local/lib/libaugeas.dylib" ]; then if [ "$pkgman" = "port" ] && ! [ -e "/usr/local/lib/libaugeas.dylib" ] && [ -e "/opt/local/lib/libaugeas.dylib" ]; then
echo "Applying augeas workaround" echo "Applying augeas workaround"
$SUDO ln -s /opt/local/lib/libaugeas.dylib /usr/local/lib $SUDO mkdir -p /usr/local/lib/
$SUDO ln -s /opt/local/lib/libaugeas.dylib /usr/local/lib/
fi fi
if ! hash pip 2>/dev/null; then if ! hash pip 2>/dev/null; then
@@ -38,17 +38,6 @@ Help for certbot itself cannot be provided until it is installed.
All arguments are accepted and forwarded to the Certbot client when run." All arguments are accepted and forwarded to the Certbot client when run."
while getopts ":hnv" arg; do
case $arg in
h)
HELP=1;;
n)
ASSUME_YES=1;;
v)
VERBOSE=1;;
esac
done
for arg in "$@" ; do for arg in "$@" ; do
case "$arg" in case "$arg" in
--debug) --debug)
@@ -65,6 +54,17 @@ for arg in "$@" ; do
ASSUME_YES=1;; ASSUME_YES=1;;
--verbose) --verbose)
VERBOSE=1;; VERBOSE=1;;
-[!-]*)
while getopts ":hnv" short_arg $arg; do
case "$short_arg" in
h)
HELP=1;;
n)
ASSUME_YES=1;;
v)
VERBOSE=1;;
esac
done;;
esac esac
done done