Created
September 2, 2016 23:05
-
-
Save parndt/42db9d019aeb2fcef5163ae7566a5fdd to your computer and use it in GitHub Desktop.
Make bundle work in Elixir *and* Ruby
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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