}
_egrep_o() {
- if ! egrep -o "$1" 2>/dev/null; then
+ if _exists egrep; then
+ egrep -o "$1" 2>/dev/null
+ else
sed -n 's/.*\('"$1"'\).*/\1/p'
fi
}
if [ ! -f "$__conf" ]; then
touch "$__conf"
fi
- if [ -n "$(tail -c 1 <"$__conf")" ]; then
+ if [ -n "$(tail -c1 <"$__conf")" ]; then
echo >>"$__conf"
fi
break
fi
- if [ "$status" = "pending" ]; then
+ if _contains "$status" "pending"; then
_info "Pending, The CA is processing your order, please just wait. ($waittimes/$MAX_RETRY_TIMES)"
- elif [ "$status" = "processing" ]; then
+ elif _contains "$status" "processing"; then
_info "Processing, The CA is processing your order, please just wait. ($waittimes/$MAX_RETRY_TIMES)"
else
_err "$d:Verify error:$response"