install.sh: install fzf+fasd
This commit is contained in:
parent
9b9d75acc4
commit
db8a39e8b6
19
install.sh
19
install.sh
|
@ -1,7 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
_clone() { [[ -d "$2" ]] || git clone --recursve "$1" "$2"; }
|
||||||
|
|
||||||
# In case this file was run via curl
|
# In case this file was run via curl
|
||||||
[ ! -d ~/.dotfiles ] && git clone --recursive https://github.com/hlissner/dotfiles ~/.dotfiles
|
_clone https://github.com/hlissner/dotfiles ~/.dotfiles
|
||||||
|
|
||||||
shopt -s extglob
|
shopt -s extglob
|
||||||
for rcfile in "${HOME}/.dotfiles/!(.*|bin|scripts|*.md|install.sh)"
|
for rcfile in "${HOME}/.dotfiles/!(.*|bin|scripts|*.md|install.sh)"
|
||||||
|
@ -9,6 +11,17 @@ do
|
||||||
filep="$HOME/."$(basename "$rcfile")
|
filep="$HOME/."$(basename "$rcfile")
|
||||||
|
|
||||||
[ "$1" == "--force" ] && rm -f "$filep"
|
[ "$1" == "--force" ] && rm -f "$filep"
|
||||||
[ -e "$filep" ] && continue
|
[ -e "$filep" ] || ln -vsF "$rcfile" $filep
|
||||||
ln -vsF "$rcfile" $filep
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
Loading…
Reference in a new issue