-
-
Save arbal/299ecd37a9fac613cdbdb3db5ed27ff0 to your computer and use it in GitHub Desktop.
Install rmate
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
| # Check effective user, and if not root/0, ask for password up front to avoid interactive prompt along the way. | |
| if [[ $EUID -ne 0 ]]; then | |
| echo "This script must be run as root to download rmate to /usr/local/bin/ and make it executable." | |
| sudo -v | |
| fi | |
| # Silently download rmate (implemented as shell script) | |
| sudo curl -sSo /usr/local/bin/rmate https://raw.githubusercontent.com/aurora/rmate/master/rmate | |
| # Make executable | |
| sudo chmod +x /usr/local/bin/rmate |
Check effective user, and if not root/0, ask for password up front to avoid interactive prompt along the way.
Run this gist from shell via:
curl -sS https://gist.githubusercontent.com/arbal/299ecd37a9fac613cdbdb3db5ed27ff0/raw | sudo bash
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Added sudo before curl
Added -sS flags after curl
English comments