Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 30 lines (24 sloc) 1.287 kb
#!/usr/bin/env bash
if [[ "$rvm_trace_flag" -eq 2 ]] ; then set -x ; export rvm_trace_flag ; fi
if [[ ! -z "$2" ]] ; then level=$1 ; shift ; else level="info" ; fi
message=$1
if [[ -z "$rvm_interactive" ]] ; then
case "$level" in
debug) shift ; echo -e "\n$(tput setaf 5)<d>$(tput sgr0) $message $(tput setaf 5)</d> $(tput sgr0) \n" ;;
info) shift ; echo -e "\n$(tput setaf 2)<i>$(tput sgr0) $message $(tput setaf 2)</i> $(tput sgr0) \n" ;;
warn) shift ; echo -e "\n$(tput setaf 3)<w>$(tput sgr0) $message $(tput setaf 3)</w> $(tput sgr0) \n" ;;
error) shift ; echo -e "\n$(tput setaf 1)<e>$(tput sgr0) $message $(tput setaf 1)</e> $(tput sgr0) \n" >&2 ;;
fail) shift ; echo -e "\n$(tput setaf 1)<f>$(tput sgr0) $message $(tput setaf 1)</f> $(tput sgr0) \n" >&2 ;;
*) echo -e "$message"
esac
else
case "$level" in
debug) shift ; echo -e "\n$(tput setaf 5)$message$(tput sgr0)\n" ;;
info) shift ; echo -e "\n$(tput setaf 2)$message$(tput sgr0)\n" ;;
warn) shift ; echo -e "\n$(tput setaf 3)$message$(tput sgr0)\n" ;;
error) shift ; echo -e "\n$(tput setaf 1)$message$(tput sgr0)\n" >&2 ;;
fail) shift ; echo -e "\n$(tput setaf 1)$message$(tput sgr0)\n" >&2 ;;
*) echo -e "$message"
esac
fi
exit 0
Jump to Line
Something went wrong with that request. Please try again.