dotfiles/install.sh

18 lines
771 B
Bash
Raw Normal View History

#!/bin/bash
# inspiration from https://github.com/webpro/dotfiles/blob/master/install.sh
# inspiration from https://medium.com/@webprolific/getting-started-with-dotfiles-43c3602fd789#.jfhvg130r
# get current dir so script can run from anywhere
export DOTFILES_DIR
DOTFILES_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# update dot files by pulling latest repo
[ -d "$DOTFILES_DIR/.git" ] && git --work-tree="$DOTFILES_DIR" --git-dir="$DOTFILES_DIR/.git" pull origin master
# symlink our dotfiles to our users home dir so they can make use of all the good stuff in it
ln -sfv "$DOTFILES_DIR/.bash_profile" ~
ln -sfv "$DOTFILES_DIR/.bashrc" ~
ln -sfv "$DOTFILES_DIR/.bash_aliases" ~
ln -sfv "$DOTFILES_DIR/.bash_functions" ~
2017-08-10 03:35:06 -04:00
ln -sfv "$DOTFILES_DIR/.envars" ~