Skip to content

Instantly share code, notes, and snippets.

@avsm
Last active December 22, 2015 00:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save avsm/6393649 to your computer and use it in GitHub Desktop.
Save avsm/6393649 to your computer and use it in GitHub Desktop.
ocamlot worker setup script
#!/bin/sh -ex
OCAML_BRANCH=4.01
MAKE=make
inst=`pwd`/inst
if [ ! -d inst ]; then
rm -rf opam
git clone git://github.com/OCamlPro/opam
cd opam
./configure --prefix=$inst && $MAKE && $MAKE install
cd ..
fi
export PATH=$inst/bin:$PATH
export OPAMROOT=`pwd`/.opam
export OPAMYES=1
opam init
opam switch 4.01.0beta1
eval `opam config env`
if [ ! -d ocamlot ]; then
git clone git://github.com/ocamllabs/ocamlot
cd ocamlot
mkdir -p state
git fetch
git checkout -b transients origin/transients
./install_deps.sh
oasis setup
$MAKE
cd ..
fi
if [ ! -d ocaml ]; then
git clone git://github.com/ocaml/ocaml
cd ocaml
git checkout $OCAML_BRANCH
cd ..
fi
if [ ! -d worker ]; then
mkdir worker
cd worker
../ocamlot/install_ocaml.sh $OCAML_BRANCH ../ocaml
cd ..
fi
if [ ! -d tmp ]; then
mkdir tmp
fi
export TMPDIR=`pwd`/tmp
cd worker
../ocamlot/start_one_worker.sh https://ocamlot.recoil.org
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment