dc941bbd9c830c224e07b0f1b8eaa8c807698de3
David Blume first commit

David Blume authored 8 years ago

1) #!/bin/bash
2) set -eu -o pipefail # See: https://sipb.mit.edu/doc/safe-shell/
3) 
David Blume Restore link to markdown so...

David Blume authored 8 years ago

4) declare -r backup_dir=$HOME/backup_of_orig_dotfiles_`date "+%Y-%m-%d"`
David Blume first commit

David Blume authored 8 years ago

5) 
6) if [ ! -d $backup_dir ]; then
7)     mkdir -p $backup_dir
8) fi
9) 
10) # Move original dot files to backup
11) if [ -e $HOME/.bashrc ]; then
12)     mv $HOME/.bashrc $backup_dir
13) fi
14) if [ -e $HOME/.bash_profile ]; then
15)     mv $HOME/.bash_profile $backup_dir
16) fi
17) if [ -e $HOME/.gitconfig ]; then
18)     mv $HOME/.gitconfig $backup_dir
19) fi
20) if [ -d $HOME/.vim ]; then
21)     mv $HOME/.vim $backup_dir
22) fi
23) 
24) echo Note: Your old dotfiles are backed up to $backup_dir
25) 
David Blume Add descriptions of the vim...

David Blume authored 8 years ago

26) # Move new dot files in.
27) # If you cloned the repo, consider making symbolic links instead,
28) # to more easily keep this home directory current by pulling updates.
29) cp .bashrc $HOME
30) cp .bash_profile $HOME
31) cp .gitconfig $HOME
32) cp -r .vim $HOME