Created
January 15, 2013 15:42
-
-
Save chikuchikugonzalez/4539557 to your computer and use it in GitHub Desktop.
時分の環境でMinGW RubyとActiveRubyとJRubyを切り替えるために作った簡易バッチファイル
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
:: vim: set sts=4 ts=4 sw=4 expandtab: | |
setlocal ENABLEDELAYEDEXPANSION | |
set _rubyhome_ruby=E:\Ruby\Ruby1.9 | |
set _rubyhome_ruby18=E:\Ruby\Ruby1.8 | |
set _rubyhome_ruby19=E:\Ruby\Ruby1.9 | |
set _rubyhome_activeruby=E:\Ruby\ActiveRuby1.9 | |
set _rubyhome_activeruby18=E:\Ruby\ActiveRuby1.8 | |
set _rubyhome_activeruby19=E:\Ruby\ActiveRuby1.9 | |
set _rubyhome_jruby=E:\Ruby\JRuby1.7 | |
set _rubyhome_jruby17=E:\Ruby\JRuby1.7 | |
set _rubyhome_default=E:\Ruby\Ruby1.9 | |
set _rubyversion=%1 | |
if "%1" == "" ( | |
21set _rubyversion=default | |
) | |
if not "!_rubyhome_%_rubyversion%!" == "" ( | |
set PATH=!_rubyhome_%_rubyversion%!\bin;!PATH! | |
cmd | |
) else ( | |
echo Unknown Ruby: !_rubyversion! | |
) | |
:END | |
endlocal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment