mirror of https://gitee.com/bigwinds/arangodb
Feature/download syncer centosix (#3381)
The ancient curl on centos 6 doesn't know howto download files directly by following 30x, add a wrapper shellscipt that can do this with several curl calls to work around this.
This commit is contained in:
parent
d86f27bd19
commit
a8ddaf56f6
|
@ -715,7 +715,8 @@ if test -n "${DOWNLOAD_SYNCER_USER}"; then
|
|||
fi
|
||||
if ! test -f "${BUILD_DIR}/${FN}-${SYNCER_REV}"; then
|
||||
rm -f "${FN}"
|
||||
curl -LJO# -H 'Accept: application/octet-stream' "${SYNCER_URL}?access_token=${OAUTH_TOKEN}"
|
||||
curl -LJO# -H 'Accept: application/octet-stream' "${SYNCER_URL}?access_token=${OAUTH_TOKEN}" || \
|
||||
${SRC}/Installation/Jenkins/curl_time_machine.sh "${SYNCER_URL}?access_token=${OAUTH_TOKEN}" "${FN}"
|
||||
mv "${FN}" "${BUILD_DIR}/${TN}"
|
||||
${MD5} < "${BUILD_DIR}/${TN}" | ${SED} "s; .*;;" > "${BUILD_DIR}/${FN}-${SYNCER_REV}"
|
||||
OLD_MD5=$(cat "${BUILD_DIR}/${FN}-${SYNCER_REV}")
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Work around stoneage curl versions that can't follow redirects
|
||||
|
||||
curl -D /tmp/headers -H 'Accept: application/octet-stream' "$1"
|
||||
|
||||
for URL in $(grep location: /tmp/headers |sed -e "s;\r;;" -e "s;.*: ;;"); do
|
||||
curl $URL > $2
|
||||
done
|
Loading…
Reference in New Issue