mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-05-07 16:34:11 +00:00
fix cd back use subshell
This commit is contained in:
parent
1b59b0b739
commit
0179f2d15f
28
acme.sh
28
acme.sh
@ -345,7 +345,7 @@ _debug() {
|
|||||||
fi
|
fi
|
||||||
if [ "${DEBUG:-$DEBUG_LEVEL_NONE}" -ge "$DEBUG_LEVEL_1" ]; then
|
if [ "${DEBUG:-$DEBUG_LEVEL_NONE}" -ge "$DEBUG_LEVEL_1" ]; then
|
||||||
_bash_debug=$(__debug_bash_helper)
|
_bash_debug=$(__debug_bash_helper)
|
||||||
_printargs "${_bash_debug}$@" >&2
|
_printargs "${_bash_debug}$*" >&2
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -379,7 +379,7 @@ _debug2() {
|
|||||||
fi
|
fi
|
||||||
if [ "${DEBUG:-$DEBUG_LEVEL_NONE}" -ge "$DEBUG_LEVEL_2" ]; then
|
if [ "${DEBUG:-$DEBUG_LEVEL_NONE}" -ge "$DEBUG_LEVEL_2" ]; then
|
||||||
_bash_debug=$(__debug_bash_helper)
|
_bash_debug=$(__debug_bash_helper)
|
||||||
_printargs "${_bash_debug}$@" >&2
|
_printargs "${_bash_debug}$*" >&2
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -412,7 +412,7 @@ _debug3() {
|
|||||||
fi
|
fi
|
||||||
if [ "${DEBUG:-$DEBUG_LEVEL_NONE}" -ge "$DEBUG_LEVEL_3" ]; then
|
if [ "${DEBUG:-$DEBUG_LEVEL_NONE}" -ge "$DEBUG_LEVEL_3" ]; then
|
||||||
_bash_debug=$(__debug_bash_helper)
|
_bash_debug=$(__debug_bash_helper)
|
||||||
_printargs "${_bash_debug}$@" >&2
|
_printargs "${_bash_debug}$*" >&2
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -547,7 +547,7 @@ _exists() {
|
|||||||
|
|
||||||
#a + b
|
#a + b
|
||||||
_math() {
|
_math() {
|
||||||
_m_opts="$@"
|
_m_opts="$*"
|
||||||
printf "%s" "$(($_m_opts))"
|
printf "%s" "$(($_m_opts))"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1062,7 +1062,7 @@ _sign() {
|
|||||||
_sign_openssl="${ACME_OPENSSL_BIN:-openssl} dgst -sign $keyfile "
|
_sign_openssl="${ACME_OPENSSL_BIN:-openssl} dgst -sign $keyfile "
|
||||||
|
|
||||||
if _isRSA "$keyfile" >/dev/null 2>&1; then
|
if _isRSA "$keyfile" >/dev/null 2>&1; then
|
||||||
$_sign_openssl -$alg | _base64
|
$_sign_openssl -$alg | _base64 "$@"
|
||||||
elif _isEcc "$keyfile" >/dev/null 2>&1; then
|
elif _isEcc "$keyfile" >/dev/null 2>&1; then
|
||||||
if ! _signedECText="$($_sign_openssl -sha$__ECC_KEY_LEN | ${ACME_OPENSSL_BIN:-openssl} asn1parse -inform DER)"; then
|
if ! _signedECText="$($_sign_openssl -sha$__ECC_KEY_LEN | ${ACME_OPENSSL_BIN:-openssl} asn1parse -inform DER)"; then
|
||||||
_err "Sign failed: $_sign_openssl"
|
_err "Sign failed: $_sign_openssl"
|
||||||
@ -6909,15 +6909,15 @@ installOnline() {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd "$PROJECT_NAME-$_branch"
|
(
|
||||||
chmod +x $PROJECT_ENTRY
|
cd "$PROJECT_NAME-$_branch" || return 1
|
||||||
if ./$PROJECT_ENTRY --install "$@"; then
|
chmod +x $PROJECT_ENTRY
|
||||||
_info "Install success!"
|
if ./$PROJECT_ENTRY --install "$@"; then
|
||||||
_initpath
|
_info "Install success!"
|
||||||
_saveaccountconf "UPGRADE_HASH" "$(_getUpgradeHash)"
|
_initpath
|
||||||
fi
|
_saveaccountconf "UPGRADE_HASH" "$(_getUpgradeHash)"
|
||||||
|
fi
|
||||||
cd ..
|
)
|
||||||
|
|
||||||
rm -rf "$PROJECT_NAME-$_branch"
|
rm -rf "$PROJECT_NAME-$_branch"
|
||||||
rm -f "$localname"
|
rm -f "$localname"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user