diff --git a/README.md b/README.md index 6a462bf..b3cb5fa 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ You can use this to set environment variables, define functions, and run post-lo #### Everything else - $ wget https://raw.githubusercontent.com/Russell91/sshrc/master/sshrc && + $ wget https://raw.githubusercontent.com/cdown/sshrc/master/sshrc && chmod +x sshrc && sudo mv sshrc /usr/local/bin #or anywhere else on your PATH diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..efeb458 --- /dev/null +++ b/install.sh @@ -0,0 +1,21 @@ +#!/bin/bash +set -e + +# SSHRC +# https://github.com/cdown/sshrc/ +# sshrc works just like ssh, but it also sources the ~/.sshrc on your local computer after logging in remotely. + +# Install sshrc +wget https://raw.githubusercontent.com/cdown/sshrc/master/sshrc +chmod +x sshrc +sudo mv sshrc /usr/local/bin #or anywhere else on your PATH + +# Make a link to your local .bashrc file that sshrc will copy at connection at /tmp/..sshrc... +mkdir ~/.sshrc.d +ln -s ~/.bashrc ~/.sshrc.d + +echo -e "echo \"Your custom .bashrc file has been copied and sourced\" +source /tmp/..sshrc.*/.sshrc.d/.bashrc" > ~/.sshrc + +# Connection +# sshrc $USER host_ip \ No newline at end of file