Skip to content

Instantly share code, notes, and snippets.

@burke
Created February 3, 2010 02:43
Show Gist options
  • Save burke/293282 to your computer and use it in GitHub Desktop.
Save burke/293282 to your computer and use it in GitHub Desktop.
if [[ ! -z "$unicode_flag" ]] ; then
interpreter="$(echo $ruby_string | awk -F'-' '{print $1}')"
version="$(echo $ruby_string | awk -F'-' '{print $2}')"
[[ x$interpreter = xjruby ]] && unicode=""
[[ x$interpreter = xrbx ]] && unicode="☃"
[[ x$interpreter = xree ]] && unicode=""
[[ x$interpreter = xmacruby ]] && unicode=""
[[ x$interpreter = xmaglev ]] && unicode=""
[[ x$interpreter = xironruby ]] && unicode=""
[[ x$interpreter = xmput ]] && unicode=""
[[ x$interpreter = xsystem ]] && unicode="➆"
if [[ x$interpreter = xruby ]] ; then
[[ x$version = x1.8.6 ]] && unicode="❻"
[[ x$version = x1.8.7 ]] && unicode="❼"
[[ x$version = x1.9.1 ]] && unicode="❶"
[[ x$version = x1.9.2 ]] && unicode="❷"
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment