From 190496c72b6c87d05ded0da730a4ed9a8f637225 Mon Sep 17 00:00:00 2001 From: Jason Tibbitts Date: Jul 07 2017 16:04:43 +0000 Subject: Avoid syntax only supported in newer zsh zsh previous to 5.0.5 or so doesn't understand an array initializer as part of a local declaration: local z=(foo) Split this into local -a z; z=(foo). Technically the -a isn't required even for zsh 4.2 but it's clearer. Fixes #60. --- diff --git a/quick-fedora-mirror b/quick-fedora-mirror index 705e502..b88942e 100755 --- a/quick-fedora-mirror +++ b/quick-fedora-mirror @@ -661,12 +661,14 @@ checkin_upload_payload () { # We have to remove the Expect: header that curl sends but which mirrormanager cannot handle local payload=$1 local module=$2 + local -a curlopts + local curlret logit M "Making xmlrpc call for $module" - local curlopts=(--silent) + curlopts=(--silent) (( VERBOSE >= 4 )) && curlopts=(--verbose) $CURL $curlopts -H "Expect:" -H "Content-Type: text/xml" --data @$mx $MIRRORMANAGER > curl.out - local curlret=$? + curlret=$? if [[ $curlret -ne 0 ]]; then logit e "Checkin failure: curl returned $curlret" (>&2 echo "Checkin failure: curl returned $curlret")