Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Setting up a new server by copying config files from local computer.
#!/bin/bash
set -e
set -u
set -o pipefail
if [ -z $1 ]
then
echo "Usage: $0 [user@]servername"
exit 1
fi
scp ~/.bashrc $1:~
scp ~/.vimrc $1:~
scp ~/.tmux.conf $1:~
ssh $1 "curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim"
ssh $1 "curl -fLo ~/.local/z/z.sh --create-dirs https://raw.githubusercontent.com/rupa/z/master/z.sh"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.