acme.sh: [ X -o Y ] -> [ X ] || [ Y ], also '-a'

This commit is contained in:
Alin Mr 2022-12-31 07:33:41 +02:00
parent fcd7aadfd4
commit a344ae8fec

View File

@ -192,7 +192,7 @@ if [ -t 1 ]; then
fi fi
__green() { __green() {
if [ "${__INTERACTIVE}${ACME_NO_COLOR:-0}" = "10" -o "${ACME_FORCE_COLOR}" = "1" ]; then if [ "${__INTERACTIVE}${ACME_NO_COLOR:-0}" = "10" ] || [ "${ACME_FORCE_COLOR}" = "1" ]; then
printf '\33[1;32m%b\33[0m' "$1" printf '\33[1;32m%b\33[0m' "$1"
return return
fi fi
@ -200,7 +200,7 @@ __green() {
} }
__red() { __red() {
if [ "${__INTERACTIVE}${ACME_NO_COLOR:-0}" = "10" -o "${ACME_FORCE_COLOR}" = "1" ]; then if [ "${__INTERACTIVE}${ACME_NO_COLOR:-0}" = "10" ] || [ "${ACME_FORCE_COLOR}" = "1" ]; then
printf '\33[1;31m%b\33[0m' "$1" printf '\33[1;31m%b\33[0m' "$1"
return return
fi fi
@ -6335,7 +6335,7 @@ deactivate() {
# Detect profile file if not specified as environment variable # Detect profile file if not specified as environment variable
_detect_profile() { _detect_profile() {
if [ -n "$PROFILE" -a -f "$PROFILE" ]; then if [ -n "$PROFILE" ] && [ -f "$PROFILE" ]; then
echo "$PROFILE" echo "$PROFILE"
return return
fi fi