dotfiles/install.sh

39 lines
1.1 KiB
Bash
Raw Normal View History

2012-11-21 16:25:02 +01:00
#!/bin/sh
# cleaning
2016-06-16 17:28:51 +02:00
rm -rf ~/.dotfiles ~/.vim* ~/.gitignore ~/.tmux.conf ~/.config/fish
2012-11-21 16:25:02 +01:00
2013-08-19 13:53:20 +02:00
# repos
2016-06-14 13:31:47 +02:00
if [ `whoami` = "f" ]; then
2013-08-19 13:53:20 +02:00
path="git@bitbucket.org:ftpd/dotfiles.git"
else
path="https://bitbucket.org/ftpd/dotfiles.git"
fi
git clone $path ~/.dotfiles
2012-11-21 16:25:02 +01:00
# vim
2016-06-14 13:31:47 +02:00
mkdir -p ~/.config
ln -sf ~/.dotfiles/vim ~/.vim
ln -sf ~/.dotfiles/vim/init.vim ~/.vimrc
2012-11-21 16:25:02 +01:00
# .gitignore
2012-11-21 18:05:14 +01:00
ln -sf ~/.dotfiles/gitignore ~/.gitignore
git config --global core.excludesfile ~/.gitignore
2013-08-19 11:42:09 +02:00
# tmux
ln -sf ~/.dotfiles/tmux.conf ~/.tmux.conf
2016-06-16 17:26:43 +02:00
# fish
touch ~/.fish.local
mkdir -p ~/.config/fish/functions
2016-06-16 20:23:37 +02:00
#curl -L https://github.com/oh-my-fish/theme-agnoster/raw/master/fish_prompt.fish > ~/.config/fish/functions/fish_prompt.fish
curl -sfL https://git.io/fundle-install | fish
echo "fundle plugin 'hauleth/agnoster'" >> ~/.config/fish/config.fish
echo "fundle init" >> ~/.config/fish/config.fish
2016-06-16 17:26:43 +02:00
echo 'set fish_greeting ""' >> ~/.config/fish/config.fish
2016-06-16 20:23:37 +02:00
if [ ! `whoami` = "root" ]; then
echo 'set -x DEFAULT_USER $LOGNAME' >> ~/.config/fish/config.fish
fi
2016-06-16 17:26:43 +02:00
echo 'source ~/.fish.local' >> ~/.config/fish/config.fish
2016-06-16 20:23:37 +02:00
fish -c 'fundle install; agnoster powerline'