From: Simon Ruderich Date: Tue, 8 Dec 2015 09:20:36 +0000 (+0100) Subject: ugly fix to syntax highlighting in Vim X-Git-Tag: v0.1.0~160 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=526843d66e2f698d230f659a1f917b979610eeba;p=thirdparty%2Fdehydrated.git ugly fix to syntax highlighting in Vim --- diff --git a/letsencrypt.sh b/letsencrypt.sh index 338569a..18b7c4f 100755 --- a/letsencrypt.sh +++ b/letsencrypt.sh @@ -182,7 +182,8 @@ sign_domain() { response="$(signed_request "${CA}/acme/new-authz" '{"resource": "new-authz", "identifier": {"type": "dns", "value": "'"${altname}"'"}}')" challenges="$(printf '%s\n' "${response}" | grep -Eo '"challenges":[^\[]*\[[^]]*]')" - challenge="$(printf "%s" "${challenges//\{/$'\n'{}" | grep 'http-01')" + repl=$'\n''{' # fix syntax highlighting in Vim + challenge="$(printf "%s" "${challenges//\{/${repl}}" | grep 'http-01')" challenge_token="$(printf '%s' "${challenge}" | grep -Eo '"token":\s*"[^"]*"' | cut -d'"' -f4 | sed 's/[^A-Za-z0-9_\-]/_/g')" challenge_uri="$(printf '%s' "${challenge}" | grep -Eo '"uri":\s*"[^"]*"' | cut -d'"' -f4)"