2016-10-14 21:59:34 +02:00
|
|
|
#!/usr/bin/env bash
|
2012-06-18 01:10:31 +02:00
|
|
|
#
|
2014-05-23 17:01:28 +02:00
|
|
|
# creates symlinks from the home directory to
|
2012-06-18 01:10:31 +02:00
|
|
|
# any desired dotfiles in ~/dotfiles
|
2014-05-23 17:01:28 +02:00
|
|
|
#
|
2012-06-18 01:10:31 +02:00
|
|
|
# adapted from @michaeljsmalley
|
|
|
|
# https://github.com/michaeljsmalley/dotfiles/blob/master/makesymlinks.sh
|
|
|
|
########################################################################
|
|
|
|
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
# Variables
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
|
|
|
|
# dotfiles directory
|
2014-11-03 17:40:13 +01:00
|
|
|
dir=$DOTFILES_DIR
|
|
|
|
|
2012-06-18 01:10:31 +02:00
|
|
|
# list of files/folders to symlink in homedir
|
2016-11-03 22:22:31 +01:00
|
|
|
files="aliases bashrc bash_profile bash_paths bash_prompt exports gemrc gitconfig gitignore hushlogin inputrc private npmrc bin"
|
2014-11-03 17:40:13 +01:00
|
|
|
|
2012-06-18 01:10:31 +02:00
|
|
|
|
|
|
|
# ----------------------------------------------------------------------
|
2014-11-03 17:40:13 +01:00
|
|
|
# create symlinks from the homedir to any files in the dotfiles directory
|
2012-06-18 01:10:31 +02:00
|
|
|
# specified in $files
|
|
|
|
# ----------------------------------------------------------------------
|
2014-11-03 17:40:13 +01:00
|
|
|
|
2012-06-18 01:10:31 +02:00
|
|
|
for file in $files; do
|
|
|
|
ln -s $dir/$file ~/.$file
|
2014-11-03 17:40:13 +01:00
|
|
|
echo "$(tput setaf 64)✓$(tput sgr0) Created symlink to $(tput setaf 37)$file$(tput sgr0)"
|
2012-06-18 01:10:31 +02:00
|
|
|
done
|
|
|
|
|
2014-11-03 17:40:13 +01:00
|
|
|
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
# source what we just created
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
|
|
|
|
source ~/.bash_profile
|
|
|
|
|
|
|
|
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
# Homebrew
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
|
|
|
|
echo "$(tput setaf 136)"
|
|
|
|
echo " Brewing all the things. "
|
|
|
|
echo "============================================="
|
|
|
|
echo "$(tput sgr0)" # reset
|
|
|
|
|
2016-11-03 22:22:31 +01:00
|
|
|
$dir/brew.sh
|
2014-11-03 17:40:13 +01:00
|
|
|
|
|
|
|
echo "$(tput setaf 64)" # green
|
|
|
|
echo "---------------------------------------------"
|
|
|
|
echo " ✓ done"
|
|
|
|
echo "$(tput sgr0)" # reset
|
|
|
|
|
|
|
|
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
# npm
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
|
|
|
|
echo "$(tput setaf 136)"
|
|
|
|
echo " npm all the things. "
|
|
|
|
echo "============================================="
|
|
|
|
echo "$(tput sgr0)" # reset
|
|
|
|
|
2016-11-03 22:22:31 +01:00
|
|
|
$dir/npm.sh
|
2014-11-03 17:40:13 +01:00
|
|
|
|
|
|
|
echo "$(tput setaf 64)" # green
|
|
|
|
echo "---------------------------------------------"
|
|
|
|
echo " ✓ done"
|
|
|
|
echo "$(tput sgr0)" # reset
|
|
|
|
|
|
|
|
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
# Ruby
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
|
|
|
|
echo "$(tput setaf 136)"
|
|
|
|
echo " Ruby all the things. "
|
|
|
|
echo "============================================="
|
|
|
|
echo "$(tput sgr0)" # reset
|
|
|
|
|
2016-11-03 22:22:31 +01:00
|
|
|
$dir/ruby.sh
|
2014-11-03 17:40:13 +01:00
|
|
|
|
|
|
|
echo "$(tput setaf 64)" # green
|
|
|
|
echo "---------------------------------------------"
|
|
|
|
echo " ✓ done"
|
|
|
|
echo "$(tput sgr0)" # reset
|
|
|
|
|
|
|
|
|
|
|
|
echo "$(tput setaf 64)" # green
|
|
|
|
echo "============================================="
|
|
|
|
echo " ✓ all done"
|
|
|
|
echo "============================================="
|
2015-09-25 11:15:23 +02:00
|
|
|
echo "$(tput sgr0)" # reset
|