Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@musically-ut
Created March 16, 2017 23:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save musically-ut/b6681ba714ced061075528e29be575a5 to your computer and use it in GitHub Desktop.
Save musically-ut/b6681ba714ced061075528e29be575a5 to your computer and use it in GitHub Desktop.
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