Skip to content
Snippets Groups Projects
Commit c29a89dd authored by Ralf Jung's avatar Ralf Jung
Browse files

fix checking whether the repos already exist

parent 06e2e183
No related branches found
No related tags found
No related merge requests found
...@@ -44,19 +44,19 @@ eval `opam conf env` ...@@ -44,19 +44,19 @@ eval `opam conf env`
# Make sure we got the right set of repositories registered. # Make sure we got the right set of repositories registered.
# By default, they are added with rank 1, i.e. at the top of the list. So we add them with increasing priority. # By default, they are added with rank 1, i.e. at the top of the list. So we add them with increasing priority.
test -d "$OPAMROOT/repo/coq-released" || run opam repo add coq-released https://coq.inria.fr/opam/released test -f "$OPAMROOT/repo/coq-released.tar.gz" || run opam repo -a add coq-released https://coq.inria.fr/opam/released
if echo "$@" | egrep "\b(dev|beta|rc)" > /dev/null; then if echo "$@" | egrep "\b(dev|beta|rc)" > /dev/null; then
# We are compiling against a dev version of something. Get ourselves the dev repositories. # We are compiling against a dev version of something. Get ourselves the dev repositories.
status "[prepare-opam] adding Coq dev repositories" status "[prepare-opam] adding Coq dev repositories"
run opam repo -a add coq-extra-dev https://coq.inria.fr/opam/extra-dev test -f "$OPAMROOT/repo/coq-extra-dev.tar.gz" || run opam repo -a add coq-extra-dev https://coq.inria.fr/opam/extra-dev
run opam repo -a add coq-core-dev https://coq.inria.fr/opam/core-dev test -f "$OPAMROOT/repo/coq-core-dev.tar.gz" || run opam repo -a add coq-core-dev https://coq.inria.fr/opam/core-dev
else else
# No dev version, make sure we do not have the dev repositories. # No dev version, make sure we do not have the dev repositories.
status "[prepare-opam] removing Coq dev repositories" status "[prepare-opam] removing Coq dev repositories"
run opam repo -a remove coq-extra-dev run opam repo -a remove coq-extra-dev
run opam repo -a remove coq-core-dev run opam repo -a remove coq-core-dev
fi fi
test -d "$OPAMROOT/repo/iris-dev" || run opam repo add iris-dev git+https://gitlab.mpi-sws.org/iris/opam.git test -f "$OPAMROOT/repo/iris-dev.tar.gz" || run opam repo -a add iris-dev git+https://gitlab.mpi-sws.org/iris/opam.git
run opam repo prio iris-dev 1 # make sure this stays at the top run opam repo prio iris-dev 1 # make sure this stays at the top
echo echo
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment