diff options
author | Robby Russell <robby@planetargon.com> | 2013-09-11 06:16:30 -0700 |
---|---|---|
committer | Robby Russell <robby@planetargon.com> | 2013-09-11 06:16:30 -0700 |
commit | e99a8fb9c22b42dff9fdc8f93ef87ce8b856361c (patch) | |
tree | fb7fdf6ccaaab4464af46c9a45717aea2a7e80d2 | |
parent | cf4eded92192cb4b97b9cee03d1b08d54df81280 (diff) | |
parent | 69ce2362d6b4c46450a07d9ffdb3deabc48b5ffd (diff) | |
download | zsh-e99a8fb9c22b42dff9fdc8f93ef87ce8b856361c.tar.gz zsh-e99a8fb9c22b42dff9fdc8f93ef87ce8b856361c.tar.bz2 zsh-e99a8fb9c22b42dff9fdc8f93ef87ce8b856361c.zip |
Merge pull request #2080 from Mehonoshin/bundler-parallel-installing
Support of parallel bundle install
-rw-r--r-- | plugins/bundler/bundler.plugin.zsh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh index c01241409..1e70db6af 100644 --- a/plugins/bundler/bundler.plugin.zsh +++ b/plugins/bundler/bundler.plugin.zsh @@ -1,10 +1,17 @@ alias be="bundle exec" -alias bi="bundle install" alias bl="bundle list" alias bp="bundle package" alias bo="bundle open" alias bu="bundle update" +if [[ "$(uname)" == 'Darwin' ]] +then + local cores_num="$(sysctl hw.ncpu | awk '{print $2}')" +else + local cores_num="$(nproc)" +fi +eval "alias bi='bundle install --jobs=$cores_num'" + # The following is based on https://github.com/gma/bundler-exec bundled_commands=(annotate berks cap capify cucumber foodcritic foreman guard jekyll kitchen knife middleman nanoc rackup rainbows rake rspec ruby shotgun spec spin spork strainer tailor thin thor unicorn unicorn_rails puma) @@ -42,3 +49,4 @@ for cmd in $bundled_commands; do compdef _$cmd bundled_$cmd=$cmd fi done + |