Skip to content

Instantly share code, notes, and snippets.

@parndt
Created September 2, 2016 23:05
Show Gist options
  • Save parndt/42db9d019aeb2fcef5163ae7566a5fdd to your computer and use it in GitHub Desktop.
Save parndt/42db9d019aeb2fcef5163ae7566a5fdd to your computer and use it in GitHub Desktop.
Make bundle work in Elixir *and* Ruby
# Making fun of "bundler for elixir"
function bundle {
if [ -e "Gemfile" ]; then
command bundle $@
elif [ -e "mix.exs" ]; then
if [[ $@ == update* ]]; then
command mix deps.$@
else
command mix deps.get
fi;
else
echo "Nothing found to 'bundle'"
fi
}
# works in ruby or elixir:
$ bundle
$ bundle update project_name
# works in ruby:
$ bundle update
# works in elixir
$ bundle update --all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment