helm/install.sh

28 lines
693 B
Bash
Raw Normal View History

2015-12-23 03:30:48 -08:00
#!/usr/bin/env bash
2014-04-11 02:55:36 -07:00
2015-12-22 23:19:23 -08:00
_clone() { [[ -d "$2" ]] || git clone --recursve "$1" "$2"; }
2014-07-29 21:49:10 -07:00
# In case this file was run via curl
2015-12-22 23:19:23 -08:00
_clone https://github.com/hlissner/dotfiles ~/.dotfiles
2014-04-11 02:55:36 -07:00
2014-09-19 14:19:17 -07:00
shopt -s extglob
2015-12-23 03:30:48 -08:00
for rcfile in "${HOME}"/.dotfiles/!(.*|bin|scripts|*.md|install.sh)
2015-12-20 20:37:13 -08:00
do
2014-09-19 14:19:17 -07:00
filep="$HOME/."$(basename "$rcfile")
2014-07-29 21:49:10 -07:00
2014-09-29 12:36:20 -07:00
[ "$1" == "--force" ] && rm -f "$filep"
2015-12-23 03:30:48 -08:00
[ -e "$filep" ] || ln -vs "$rcfile" "$filep"
2014-07-29 21:49:10 -07:00
done
2015-12-22 23:19:23 -08:00
# Install fzf and fasd
case $OSTYPE in
darwin*)
brew install fzf fasd
;;
linux*)
_clone https://github.com/junegunn/fzf ~/.fzf
_clone https://github.com/clvv/fasd ~/fasd && \
cd ~/fasd && make install && rm -rf ~/fasd
;;
esac