Skip to content

Instantly share code, notes, and snippets.

@ympons
Last active November 20, 2018 16:15
Show Gist options
  • Save ympons/dc53d4b194625fade87c79b10191a216 to your computer and use it in GitHub Desktop.
Save ympons/dc53d4b194625fade87c79b10191a216 to your computer and use it in GitHub Desktop.

Revisions

  1. ympons revised this gist Oct 30, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install-erlang-and-elixir.sh
    Original file line number Diff line number Diff line change
    @@ -51,7 +51,7 @@ export PATH="$ERLANG_PATH/bin:$ELIXIR_PATH/bin:$PATH"
    # Install package tools
    if [ ! -e $HOME/.mix/rebar ]; then
    LC_ALL=en_GB.UTF-8 mix local.hex --force
    LC_ALL=en_GB.UTF-8 mix local.rebar --force
    LC_ALL=en_GB.UTF-8 mix local.rebar --force
    fi

    exit 0
  2. ympons revised this gist Oct 30, 2016. 1 changed file with 17 additions and 12 deletions.
    29 changes: 17 additions & 12 deletions install-erlang-and-elixir.sh
    Original file line number Diff line number Diff line change
    @@ -9,16 +9,15 @@ set -e
    export ERLANG_VERSION="19.1"
    export ELIXIR_VERSION="v1.3.4"

    export INSTALL_PATH="$HOME/dependencies"
    export ERLENV_PATH="$HOME/.erlenv"
    export ERLANG_PATH="$ERLENV_PATH/otp_src_$ERLANG_VERSION"
    export ELIXIR_PATH="$ERLENV_PATH/elixir_$ELIXIR_VERSION"

    export ERLANG_PATH="$INSTALL_PATH/otp_src_$ERLANG_VERSION"
    export ELIXIR_PATH="$INSTALL_PATH/elixir_$ELIXIR_VERSION"

    mkdir -p $INSTALL_PATH
    cd $INSTALL_PATH
    mkdir -p $ERLENV_PATH
    cd $ERLENV_PATH

    # Install erlang
    if [ ! -d $ERLANG_PATH ]; then
    if [ ! -e $ERLANG_PATH/bin/erl ]; then
    curl -OL http://www.erlang.org/download/otp_src_$ERLANG_VERSION.tar.gz
    tar xzf otp_src_$ERLANG_VERSION.tar.gz
    cd $ERLANG_PATH
    @@ -31,11 +30,11 @@ if [ ! -d $ERLANG_PATH ]; then
    --disable-hipe \
    --without-javac
    make
    ln -sf $ERLANG_PATH $INSTALL_PATH/erlang

    ln -sf $ERLANG_PATH $ERLENV_PATH/erlang
    fi

    export PATH="$INSTALL_PATH/erlang/bin:$PATH"
    export PATH="$ERLANG_PATH/bin:$PATH"

    # Install elixir
    if [ ! -e $ELIXIR_PATH/bin/elixir ]; then
    @@ -44,9 +43,15 @@ if [ ! -e $ELIXIR_PATH/bin/elixir ]; then
    git checkout $ELIXIR_VERSION
    make

    ln -sf $ELIXIR_PATH $INSTALL_PATH/elixir
    ln -sf $ELIXIR_PATH $ERLENV_PATH/elixir
    fi

    export PATH="$INSTALL_PATH/elixir/bin:$PATH"
    export PATH="$ERLANG_PATH/bin:$ELIXIR_PATH/bin:$PATH"

    # Install package tools
    if [ ! -e $HOME/.mix/rebar ]; then
    LC_ALL=en_GB.UTF-8 mix local.hex --force
    LC_ALL=en_GB.UTF-8 mix local.rebar --force
    fi

    exit 0
  3. ympons revised this gist Oct 30, 2016. 1 changed file with 8 additions and 7 deletions.
    15 changes: 8 additions & 7 deletions install-erlang-and-elixir.sh
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,6 @@
    #!/bin/bash
    # Install Erlang 19.1 & Elixir 1.3.4 on Ubuntu box (tested on 14.04)
    # Pull this file down, make it executable and run it
    # $ wget https://gist.github.com/ympons/dc53d4b194625fade87c79b10191a216/raw/272bdeca9d8f480b52adccfb99423be2c764998a/install-erlang-and-elixir.sh
    # $ chmod u+x install-erlang-and-elixir.sh
    # $ ./install-erlang-and-elixir.sh

    #
    # sudo apt-get update
    # sudo apt-get -y install build-essential libncurses5-dev openssl libssl-dev fop xsltproc unixodbc-dev

    @@ -35,9 +31,12 @@ if [ ! -d $ERLANG_PATH ]; then
    --disable-hipe \
    --without-javac
    make
    sudo make install

    ln -sf $ERLANG_PATH $INSTALL_PATH/erlang
    fi

    export PATH="$INSTALL_PATH/erlang/bin:$PATH"

    # Install elixir
    if [ ! -e $ELIXIR_PATH/bin/elixir ]; then
    git clone https://github.com/elixir-lang/elixir $ELIXIR_PATH
    @@ -48,4 +47,6 @@ if [ ! -e $ELIXIR_PATH/bin/elixir ]; then
    ln -sf $ELIXIR_PATH $INSTALL_PATH/elixir
    fi

    export PATH="$ELIXIR_PATH/bin:$PATH"
    export PATH="$INSTALL_PATH/elixir/bin:$PATH"

    exit 0
  4. ympons revised this gist Oct 29, 2016. 1 changed file with 1 addition and 7 deletions.
    8 changes: 1 addition & 7 deletions install-erlang-and-elixir.sh
    Original file line number Diff line number Diff line change
    @@ -48,10 +48,4 @@ if [ ! -e $ELIXIR_PATH/bin/elixir ]; then
    ln -sf $ELIXIR_PATH $INSTALL_PATH/elixir
    fi

    export PATH="$ELIXIR_PATH/bin:$PATH"

    # Install package tools
    if [ ! -e $HOME/.mix/rebar ]; then
    yes Y | LC_ALL=en_GB.UTF-8 mix local.hex --force
    yes Y | LC_ALL=en_GB.UTF-8 mix local.rebar --force
    fi
    export PATH="$ELIXIR_PATH/bin:$PATH"
  5. ympons revised this gist Oct 29, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install-erlang-and-elixir.sh
    Original file line number Diff line number Diff line change
    @@ -22,7 +22,7 @@ mkdir -p $INSTALL_PATH
    cd $INSTALL_PATH

    # Install erlang
    if [ ! -e $ERLANG_PATH ]; then
    if [ ! -d $ERLANG_PATH ]; then
    curl -OL http://www.erlang.org/download/otp_src_$ERLANG_VERSION.tar.gz
    tar xzf otp_src_$ERLANG_VERSION.tar.gz
    cd $ERLANG_PATH
  6. ympons revised this gist Oct 29, 2016. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions install-erlang-and-elixir.sh
    Original file line number Diff line number Diff line change
    @@ -5,10 +5,10 @@
    # $ chmod u+x install-erlang-and-elixir.sh
    # $ ./install-erlang-and-elixir.sh

    set -e
    # sudo apt-get update
    # sudo apt-get -y install build-essential libncurses5-dev openssl libssl-dev fop xsltproc unixodbc-dev

    sudo apt-get update
    sudo apt-get -y install build-essential libncurses5-dev openssl libssl-dev fop xsltproc unixodbc-dev
    set -e

    export ERLANG_VERSION="19.1"
    export ELIXIR_VERSION="v1.3.4"
    @@ -52,6 +52,6 @@ export PATH="$ELIXIR_PATH/bin:$PATH"

    # Install package tools
    if [ ! -e $HOME/.mix/rebar ]; then
    yes Y | LC_ALL=en_GB.UTF-8 mix local.hex
    yes Y | LC_ALL=en_GB.UTF-8 mix local.rebar
    yes Y | LC_ALL=en_GB.UTF-8 mix local.hex --force
    yes Y | LC_ALL=en_GB.UTF-8 mix local.rebar --force
    fi
  7. ympons revised this gist Oct 28, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions install-erlang-and-elixir.sh
    Original file line number Diff line number Diff line change
    @@ -7,12 +7,12 @@

    set -e

    sudo apt-get install build-essential libncurses5-dev openssl libssl-dev fop xsltproc unixodbc-dev
    sudo apt-get update
    sudo apt-get -y install build-essential libncurses5-dev openssl libssl-dev fop xsltproc unixodbc-dev

    export ERLANG_VERSION="19.1"
    export ELIXIR_VERSION="v1.3.4"


    export INSTALL_PATH="$HOME/dependencies"

    export ERLANG_PATH="$INSTALL_PATH/otp_src_$ERLANG_VERSION"
  8. ympons revised this gist Oct 28, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install-erlang-and-elixir.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    #!/bin/bash
    # Install Erlang 19.1 & Elixir 1.3.4 on Ubuntu box (tested on 14.04)
    # Pull this file down, make it executable and run it
    # $ wget url_to_this_file
    # $ wget https://gist.github.com/ympons/dc53d4b194625fade87c79b10191a216/raw/272bdeca9d8f480b52adccfb99423be2c764998a/install-erlang-and-elixir.sh
    # $ chmod u+x install-erlang-and-elixir.sh
    # $ ./install-erlang-and-elixir.sh

  9. ympons created this gist Oct 28, 2016.
    57 changes: 57 additions & 0 deletions install-erlang-and-elixir.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,57 @@
    #!/bin/bash
    # Install Erlang 19.1 & Elixir 1.3.4 on Ubuntu box (tested on 14.04)
    # Pull this file down, make it executable and run it
    # $ wget url_to_this_file
    # $ chmod u+x install-erlang-and-elixir.sh
    # $ ./install-erlang-and-elixir.sh

    set -e

    sudo apt-get install build-essential libncurses5-dev openssl libssl-dev fop xsltproc unixodbc-dev

    export ERLANG_VERSION="19.1"
    export ELIXIR_VERSION="v1.3.4"


    export INSTALL_PATH="$HOME/dependencies"

    export ERLANG_PATH="$INSTALL_PATH/otp_src_$ERLANG_VERSION"
    export ELIXIR_PATH="$INSTALL_PATH/elixir_$ELIXIR_VERSION"

    mkdir -p $INSTALL_PATH
    cd $INSTALL_PATH

    # Install erlang
    if [ ! -e $ERLANG_PATH ]; then
    curl -OL http://www.erlang.org/download/otp_src_$ERLANG_VERSION.tar.gz
    tar xzf otp_src_$ERLANG_VERSION.tar.gz
    cd $ERLANG_PATH
    ./configure --enable-smp-support \
    --enable-m64-build \
    --disable-native-libs \
    --disable-sctp \
    --enable-threads \
    --enable-kernel-poll \
    --disable-hipe \
    --without-javac
    make
    sudo make install
    fi

    # Install elixir
    if [ ! -e $ELIXIR_PATH/bin/elixir ]; then
    git clone https://github.com/elixir-lang/elixir $ELIXIR_PATH
    cd $ELIXIR_PATH
    git checkout $ELIXIR_VERSION
    make

    ln -sf $ELIXIR_PATH $INSTALL_PATH/elixir
    fi

    export PATH="$ELIXIR_PATH/bin:$PATH"

    # Install package tools
    if [ ! -e $HOME/.mix/rebar ]; then
    yes Y | LC_ALL=en_GB.UTF-8 mix local.hex
    yes Y | LC_ALL=en_GB.UTF-8 mix local.rebar
    fi