Fix issues with relative paths, fix code style
This commit is contained in:
parent
f7f5f21e46
commit
37124411df
@ -1,19 +1,25 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
if ! [ -f 'src/tezos-deps.opam' ]; then
|
||||||
OCAML_VERSION=4.03.0
|
echo
|
||||||
if [ "$(ocaml -vnum)" != "${OCAML_VERSION}" ]; then
|
echo " Please run from the project's root directory. Aborting."
|
||||||
echo ;
|
echo
|
||||||
echo " Unexpected compiler version ($(ocaml -vnum))";
|
exit 1
|
||||||
echo " You should use ocaml-${OCAML_VERSION}.";
|
|
||||||
echo ;
|
|
||||||
exit 1;
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cmd=$1
|
ocaml_version=4.03.0
|
||||||
|
if [ "$(ocaml -vnum)" != "$ocaml_version" ]; then
|
||||||
|
echo
|
||||||
|
echo " Unexpected compiler version ($(ocaml -vnum))"
|
||||||
|
echo " You should use ocaml-$ocaml_version."
|
||||||
|
echo
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cmd="$1"
|
||||||
if [ -z "$cmd" ]; then cmd=all; fi
|
if [ -z "$cmd" ]; then cmd=all; fi
|
||||||
|
|
||||||
case $cmd in
|
case "$cmd" in
|
||||||
pin)
|
pin)
|
||||||
pin=yes
|
pin=yes
|
||||||
;;
|
;;
|
||||||
@ -30,14 +36,14 @@ case $cmd in
|
|||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unknown command '$cmd'."
|
echo "Unknown command '$cmd'."
|
||||||
echo "Usage: $0 [pin|depext|install|all]"
|
echo "Usage: $0 [pin|depext|install|all|]"
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
if [ ! -z "$pin" ] ; then
|
if ! [ -z "$pin" ]; then
|
||||||
opam pin --yes remove --no-action --dev-repo ocplib-resto || true
|
opam pin --yes remove --no-action --dev-repo ocplib-resto || true
|
||||||
opam pin --yes add --no-action --dev-repo sodium
|
opam pin --yes add --no-action --dev-repo sodium
|
||||||
opam pin --yes add --no-action --dev-repo ocp-ocamlres
|
opam pin --yes add --no-action --dev-repo ocp-ocamlres
|
||||||
@ -48,13 +54,13 @@ if [ ! -z "$pin" ] ; then
|
|||||||
opam pin --yes add --no-action tezos-deps src
|
opam pin --yes add --no-action tezos-deps src
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -z "$depext" ] ; then
|
if ! [ -z "$depext" ]; then
|
||||||
## In our CI, this rule is executed as user 'root'
|
## In our CI, this rule is executed as user 'root'
|
||||||
## The other rules are executed as user 'opam'.
|
## The other rules are executed as user 'opam'.
|
||||||
opam list --installed depext || opam install depext
|
opam list --installed depext || opam install depext
|
||||||
opam depext ${DEPEXTOPT} tezos-deps
|
opam depext tezos-deps
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -z "$install" ] ; then
|
if ! [ -z "$install" ]; then
|
||||||
opam install --build-test tezos-deps
|
opam install --build-test tezos-deps
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user