Shell script does not run: simple -
writing shell script switch between ruby versions because rvm setup requires me write 2-3 lines switch ruby versions, , im doing because im writing ruby app requires 2.2.1 , latex documents requires ruby 1.9.1. current code looks more pseudocode, please me run. here's code:
#!/bin/sh /bin/bash --login rvm list // external shell command echo -n use one? > read text rvm use $text // external shell command
that script problematic since run bash
login shell , refuse run of other lines until exit it.
you don't need shell script you're trying do, have 2 aliases set in profile:
alias rlist='rvm list' alias ruse='rvm use'
then can enter rlist
if want list of them, or ruse 2.2.1
(for example) select one.
alternatively, walter a
points out in comment, hard-code possibilities assuming don't want dynamic:
alias rbapp='rvm use 2.2.1' alias rbltx='rvm use 1.9.1'
this has added advantage of allowing more things @ end if needed:
alias rbltx='rvm use 1.9.1; echo using latex ruby'
something that's not possible aliases needing parameters.
Comments
Post a Comment