Created
March 16, 2017 23:14
-
-
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.
This file contains 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
#!/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