Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
21 changes: 21 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -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/.<YOUR_USERNAME>.sshrc...
mkdir ~/.sshrc.d
ln -s ~/.bashrc ~/.sshrc.d

echo -e "echo \"Your custom .bashrc file has been copied and sourced\"
source /tmp/.<YOUR_USERNAME>.sshrc.*/.sshrc.d/.bashrc" > ~/.sshrc

# Connection
# sshrc $USER host_ip