Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 27 lines (24 sloc) 0.556 kB
664095b @mpapis fallback rake command, fix #629
mpapis authored
1 #!/usr/bin/env bash
2
3 function rake_not_found()
4 {
b94108d @mpapis ERRRO -> ERROR
mpapis authored
5 printf "%b" "$(tput setaf 1)ERROR: Gem rake is not installed, run \`gem install rake\` first.$(tput sgr0)\n"
664095b @mpapis fallback rake command, fix #629
mpapis authored
6 exit 127
7 }
8
9 # in rvm warn about missing gem
10 if [[ -n "${GEM_HOME:-}" ]]
11 then
12 rake_not_found
13 else
66c6aca @mpapis fix fork bomb in fallback bundle
mpapis authored
14 current_rake="$(dirname $(which $0))"
15 export PATH
664095b @mpapis fallback rake command, fix #629
mpapis authored
16 PATH=":${PATH}:"
17 PATH="${PATH//:${current_rake}:/:}"
18 PATH="${PATH#:}"
19 PATH="${PATH%:}"
66c6aca @mpapis fix fork bomb in fallback bundle
mpapis authored
20 if [[ -n "${current_rake}" ]] && builtin command -v rake >/dev/null 2>&1
664095b @mpapis fallback rake command, fix #629
mpapis authored
21 then
66c6aca @mpapis fix fork bomb in fallback bundle
mpapis authored
22 builtin command rake "$@"
664095b @mpapis fallback rake command, fix #629
mpapis authored
23 else
24 rake_not_found
25 fi
26 fi
Something went wrong with that request. Please try again.