"plugins/git@web.lueluesay.top:root/oh-my-zsh.git" did not exist on "660eeb19c7850fd6c5470b40538426d2dbeccfe6"
Commit e8c36194 authored by Maxim Dobryakov's avatar Maxim Dobryakov
Browse files

Check bundler version to avoid error with unsupported command line arguments

parent 61e3951e
......@@ -4,13 +4,18 @@ alias bp="bundle package"
alias bo="bundle open"
alias bu="bundle update"
if [[ "$(uname)" == 'Darwin' ]]
then
bundler_version=`bundle version | cut -d' ' -f3`
if [[ $bundler_version > '1.4.0' || $bundler_version = '1.4.0' ]]; then
if [[ "$(uname)" == 'Darwin' ]]
then
local cores_num="$(sysctl hw.ncpu | awk '{print $2}')"
else
else
local cores_num="$(nproc)"
fi
eval "alias bi='bundle install --jobs=$cores_num'"
else
alias bi='bundle install'
fi
eval "alias bi='bundle install --jobs=$cores_num'"
# The following is based on https://github.com/gma/bundler-exec
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment