-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathconfigure
executable file
·40 lines (30 loc) · 1.27 KB
/
configure
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
grep Ubuntu /etc/lsb-release &> /dev/null && DIST="Ubuntu"
if [ "$DIST" = "Ubuntu" ]; then
sudo apt -y install bubblewrap m4 git python-3-pip net-tools curl mercurial darcs libcap-dev unzip
if dpkg-query -l | grep -E '^ii' | grep ocaml
then
echo "removing Ocaml pinned links"
opam pin remove -y cohttp ocaml-cohttp
opam remove -y cohttp cohttp-async
opam pin remove -y cohttp-async ocaml-cohttp
fi
pip3 install numpy
elif [ "$(uname)" == "Darwin" ]; then
brew install m4 git
fi
sh <(curl -sL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)
opam init --auto-setup --comp 4.07.1 --yes
eval $(opam env)
opam install -y dune core async xml-light alcotest alcotest-async merlin ocp-indent utop cohttp 'cohttp-async<2.1.1' 'base64<3.0.0'
echo "Clone cohttp and switch to the first commit of 2018.10.19, version 1.2.0"
git clone https://github.com/mirage/ocaml-cohttp.git
cd ocaml-cohttp/
git checkout 13f4bd609e9153b3d92acfddd1e257996e8a4a91
cd ..
rm ocaml-cohttp/cohttp-async/src/client.ml
rm ocaml-cohttp/cohttp-async/src/client.mli
cp ocaml-cohttp_/cohttp-async/src/client.ml ocaml-cohttp/cohttp-async/src/client.ml
opam remove -y cohttp cohttp-async
opam pin add -y cohttp ocaml-cohttp
opam pin add -y cohttp-async ocaml-cohttp