Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Iris
ci
Compare Revisions
e5c453511fcab2d178f687a5f226efd44f54b7f4...39c267a40904232496986518530eea6169fb8168
Commits (1)
skip opam upgrade if we are working in a fresh opam root
· 39c267a4
Ralf Jung
authored
Apr 03, 2018
39c267a4
Hide whitespace changes
Inline
Side-by-side
prepare-opam.sh
View file @
39c267a4
...
...
@@ -12,14 +12,18 @@ else
echo_color
"
$BOLDYELLOW
"
"[prepare-opam] Creating new opam root"
mkdir
"
$OPAMROOT
"
opam init
--no-setup
-y
FRESH_OPAM
=
yes
fi
eval
`
opam conf
env
`
# Make sure the pin for the builddep package exists and is up-to-date
make build-dep/opam
if
[[
-z
"
$FRESH_OPAM
"
]]
;
then
# skip if this is a fresh opam root
# Make sure the pin for the builddep package exists and is up-to-date.
# This avoids opam complaining about pins pointing to a non-existing file.
make build-dep/opam
# Update repositories
opam update
# Update repositories
opam update
fi
# Make sure we got the right set of repositories registered
if
echo
"
$@
"
| fgrep
"dev"
>
/dev/null
;
then
...
...
@@ -56,10 +60,12 @@ while (( "$#" )); do # while there are arguments left
done
echo
# Upgrade cached things.
echo_color
"
$BOLDGREEN
"
"[prepare-opam] Upgrading packages"
opam upgrade
-y
--fixup
&&
opam upgrade
-y
echo
if
[[
-z
"
$FRESH_OPAM
"
]]
;
then
# skip if this is a fresh opam root
# Upgrade cached things
echo_color
"
$BOLDGREEN
"
"[prepare-opam] Upgrading packages"
opam upgrade
-y
--fixup
&&
opam upgrade
-y
echo
fi
# Install build-dependencies.
echo_color
"
$BOLDGREEN
"
"[prepare-opam] Installing build-dependencies"
...
...