From b053fa7f5d7d1f9cc3072e0a9962136cfd3a451c Mon Sep 17 00:00:00 2001 From: Alan Peabody Date: Mon, 4 Aug 2014 21:07:44 -0400 Subject: [PATCH] Add vagrant elixir setup scripts. --- scripts/elixir.sh | 23 +++++++++++++++++++++++ scripts/erlang.sh | 13 +++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 scripts/elixir.sh create mode 100644 scripts/erlang.sh diff --git a/scripts/elixir.sh b/scripts/elixir.sh new file mode 100644 index 0000000..c24db03 --- /dev/null +++ b/scripts/elixir.sh @@ -0,0 +1,23 @@ +# Installs Elixir from github cloned source. +# Requires erlang.sh +# add to Vagrantfile: +# config.vm.provision 'shell', path: 'erlang.sh' +# config.vm.provision 'shell', privileged: false, path: 'elixir.sh' + +if [ -d /home/vagrant/elixir ] ; then + echo 'Elixir already installed' +else + sudo apt-get install make -y + cd ~ + git clone https://github.com/elixir-lang/elixir.git + cd elixir + git checkout v0.15.0 + make clean + make +fi + +if grep -lq 'elixir/bin' /home/vagrant/.bashrc ; then + echo 'Elixir already added to path' +else + echo 'export PATH=/home/vagrant/elixir/bin:$PATH' >> /home/vagrant/.bashrc +fi diff --git a/scripts/erlang.sh b/scripts/erlang.sh new file mode 100644 index 0000000..53a16fe --- /dev/null +++ b/scripts/erlang.sh @@ -0,0 +1,13 @@ +# Installs Erlang via erlang-solutions repo +# add to Vagrantfile: +# config.vm.provision 'shell', path: 'erlang.sh' + +if grep -lq 'erlang-solutions' /etc/apt/sources.list ; then + echo 'Erlang source already added' +else + cd /tmp + wget http://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb + dpkg -i erlang-solutions_1.0_all.deb + apt-get update -y + apt-get install erlang -y +fi