I want to run a script from GitHub with curl, and I can do this easily with:
# This is safe to run but will add a few lines to .bashrc, .vimrc, .inputrc to add some configuration options.
# Please check the project before running:
# https://raw.github.com/roysubs/custom_bash/
# But this is just to illustrate the point, bash shell script on GitHub, and how to use curl to pipe it to bash
curl -s https://raw.githubusercontent.com/roysubs/custom_bash/master/custom_loader.sh | bash
I have a few problems with this however that I was hoping for some help with:
- Firstly, the script always runs unattended, ignoring all
read -e -pstatements to take input from the console. I'd appreciate if there is a better way to run the script such that it does not do this. Other methods to do this would be great. - Secondly, I used git.io to shorten the above url to https://git.io/Jt0fZ but I can never get the above
curlmethod to work using this. i.e.curl -s https://git.io/Jt0fZ | bashDoes anyone know why this fails and for a workaround to use the shortened url to execute the remote script?