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:
parent
85979269c2
commit
662ba3938c
|
@ -8,17 +8,17 @@ export DELOREAN_REPO_FILE=${DELOREAN_REPO_FILE:-"delorean.repo"}
|
||||||
if [[ "rhel7 centos7" =~ "$DISTRO_NAME" ]]; then
|
if [[ "rhel7 centos7" =~ "$DISTRO_NAME" ]]; then
|
||||||
|
|
||||||
if [ -z "$STABLE_RELEASE" ]; 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
|
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
|
fi
|
||||||
|
|
||||||
elif [[ "fedora" =~ "$DISTRO_NAME" ]]; then
|
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
|
fi
|
||||||
|
|
||||||
if [ -n "$DELOREAN_REPO_URL" ]; then
|
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
|
else
|
||||||
echo "Please configure a DELOREAN_REPO_URL."
|
echo "Please configure a DELOREAN_REPO_URL."
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in New Issue