Follow HTTP/HTTPS redirects

Adding -L to curl will lead us to the correct repo definition even when
there is a redirect. Currently the tripleoclient gate is failing due to
downloading HTML instead of a repo file.

Change-Id: I9733b43ab1135fa2e4b25ff69d0e1e4d99ce9efe
Closes-Bug: #1661206
This commit is contained in:
Julie Pichon 2017-02-02 13:51:58 +00:00
parent 85979269c2
commit 662ba3938c
1 changed files with 4 additions and 4 deletions

View File

@ -8,17 +8,17 @@ export DELOREAN_REPO_FILE=${DELOREAN_REPO_FILE:-"delorean.repo"}
if [[ "rhel7 centos7" =~ "$DISTRO_NAME" ]]; then
if [ -z "$STABLE_RELEASE" ]; then
curl http://trunk.rdoproject.org/centos7/delorean-deps.repo -o /etc/yum.repos.d/delorean-deps.repo
curl -L http://trunk.rdoproject.org/centos7/delorean-deps.repo -o /etc/yum.repos.d/delorean-deps.repo
else
curl http://trunk.rdoproject.org/centos7-$STABLE_RELEASE/delorean-deps.repo -o /etc/yum.repos.d/delorean-deps.repo
curl -L http://trunk.rdoproject.org/centos7-$STABLE_RELEASE/delorean-deps.repo -o /etc/yum.repos.d/delorean-deps.repo
fi
elif [[ "fedora" =~ "$DISTRO_NAME" ]]; then
curl http://trunk.rdoproject.org/f$DIB_RELEASE/delorean-deps.repo -o /etc/yum.repos.d/delorean-deps.repo
curl -L http://trunk.rdoproject.org/f$DIB_RELEASE/delorean-deps.repo -o /etc/yum.repos.d/delorean-deps.repo
fi
if [ -n "$DELOREAN_REPO_URL" ]; then
curl $DELOREAN_REPO_URL/$DELOREAN_REPO_FILE -o /etc/yum.repos.d/$DELOREAN_REPO_FILE
curl -L $DELOREAN_REPO_URL/$DELOREAN_REPO_FILE -o /etc/yum.repos.d/$DELOREAN_REPO_FILE
else
echo "Please configure a DELOREAN_REPO_URL."
exit 1