#!/usr/bin/env bash # Copyright (c) 2016 Egor Tensin # This file is part of the "Linux/Cygwin environment" project. # For details, see https://github.com/egor-tensin/linux-home. # Distributed under the MIT License. ruby_setup() { local user_dir local bin_dir command -v ruby &> /dev/null \ && command -v gem &> /dev/null \ && user_dir="$( ruby -e 'puts Gem.user_dir' )" \ && export GEM_HOME="$user_dir" \ && bin_dir="$( ruby -e 'puts Gem.bindir' )" \ && path_export "$bin_dir" } ruby_setup