linux - Installing RVM with a specific bash command format using `-s` -
i'm trying install rvm via bash. according installation guide on rvm.io, command is:
\curl -ssl https://get.rvm.io | bash -s stable --auto-dotfiles
i'm, however, compelled download script , run separately. so, bash command attempt execute downloaded file (let's call rvm-installer
).
how can execute rvm-installer
using format below:
/bin/bash -c './rvm-installer 2>&1'
obviously, above command incorrect. i'm thinking should more this:
/bin/bash -s stable --auto-dotfiles './rvm-installer 2>&1'
i know above command sets positional parameters in correct order because of this:
$ printf "%s\n" "$@" stable --auto-dotfiles ./rvm-installer 2>&1
and this:
$ echo "$shlvl" 2
but i'm confident rvm-installer
not running because replaced contents following, test once command above run, see no output:
#!/usr/bin/env bash gimme syntax error echo "$1" echo "foo bar" exit 1
how can run rvm-installer
using -s
within bash command format need use? there way around using -s
?
-s
bash argument not rvm-installer
argument.
the other arguments rvm-installer
arguments.
so pass rvm-installer
yourself.
./rvm-installer stable --auto-dotfiles
using the, entirely pointless, explicit call bash
this
/bin/bash -c './rvm-installer stable --auto-dotfiles 2>&1'
though meaningfully well
/bin/bash rvm-installer stable --auto-dotfiles 2>&1
Comments
Post a Comment