#!/usr/bin/env bash # # creates symlinks from the home directory to # any desired dotfiles in ~/dotfiles # # adapted from @michaeljsmalley # https://github.com/michaeljsmalley/dotfiles/blob/master/makesymlinks.sh ######################################################################## set e # ---------------------------------------------------------------------- # Variables # ---------------------------------------------------------------------- # dotfiles directory cd ../ || exit # list of files/folders to symlink in homedir files="aliases bashrc bash_profile bash_paths bash_prompt exports gemrc gitconfig gitignore hushlogin inputrc private npmrc bin tmux.conf" # ---------------------------------------------------------------------- # create the private file first, will be symlinked but ignored by git # ---------------------------------------------------------------------- touch private # ---------------------------------------------------------------------- # create symlinks from the homedir to any files in the dotfiles directory # specified in $files # ---------------------------------------------------------------------- for file in $files; do ln -s "$file" ~/."$file" echo "$(tput setaf 64)✓$(tput sgr0) Created symlink to $(tput setaf 37)$file$(tput sgr0)" done # ---------------------------------------------------------------------- # source what we just created # ---------------------------------------------------------------------- source ~/.bash_profile # ---------------------------------------------------------------------- # Homebrew # ---------------------------------------------------------------------- echo "$(tput setaf 136) Brewing all the things. " echo "=============================================$(tput sgr0)" "" # reset bin/install-brew.sh echo "$(tput setaf 64)---------------------------------------------" echo " ✓ done$(tput sgr0)" # ---------------------------------------------------------------------- # npm # ---------------------------------------------------------------------- echo "$(tput setaf 136) npm all the things. " echo "=============================================$(tput sgr0)" bin/install-npm.sh echo "$(tput setaf 64)---------------------------------------------" echo " ✓ done$(tput sgr0)" # ---------------------------------------------------------------------- # Ruby # ---------------------------------------------------------------------- echo "$(tput setaf 136) Ruby all the things. " echo "=============================================$(tput sgr0)" bin/install-ruby.sh echo "$(tput setaf 64)---------------------------------------------" echo " ✓ done$(tput sgr0)" echo "$(tput setaf 64)=============================================" echo " ✓ all done" echo "=============================================$(tput sgr0)"