Skip to content

Instantly share code, notes, and snippets.

@manpages
Last active December 13, 2015 20:29
Show Gist options
  • Save manpages/4970722 to your computer and use it in GitHub Desktop.
Save manpages/4970722 to your computer and use it in GitHub Desktop.
Updates Elixir-lang to the master version.
#!/bin/bash
GITHUB_RO_DIRECTORY="$HOME/github/others"
BIN_DIRECTORY="/usr/local/bin"
GITHUB_URL="git://github.com/elixir-lang/elixir.git"
mkdir -p $GITHUB_RO_DIRECTORY > /dev/null
mkdir -p $BIN_DIRECTORY > /dev/null
cd $GITHUB_RO_DIRECTORY
[[ ! -d ./elixir ]] && git clone $GITHUB_URL
cd elixir
git pull $GITHUB_URL
make clean && make
cd bin
find . -not -name '*.bat' -not -name "*.dump" -not -name "." -exec ln -fs `pwd`/{} ${BIN_DIRECTORY}/{} \;
echo -n "= Elixir is up to date = "
date
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment