How to invoke a script downloaded with curl and pass invocation options?
I have no idea which forum would be appropriate for my question so I just picked this one :-)
Right now I use following code to download and call a small bash script from my website which initiates a more complex installation "curl https://<mydomain>/install | sudo bash" which works fine. Now I want to pass installation options the the install script. I tried "curl https://<mydomain>/install -o | sudo bash" which fails. As a workaround I can use "curl https://<mydomain>/install -O ./install && sudo ./install -o" but I frankly would like to use the first version just by adding option -o somewhere :) Is there any way to get this done or do I have to use the workaround? |
Try the -s option.
Code:
curl https://<mydomain>/install | sudo bash -s -- -o |
You made my day. -s Works perfectly :thumbsup:
|
All times are GMT -5. The time now is 11:30 AM. |