dotfiles/install.sh

54 lines
1.4 KiB
Bash
Raw Normal View History

2012-11-21 16:25:02 +01:00
#!/bin/sh
# cleaning
2016-12-19 17:06:38 +01:00
rm -rf ~/.bash* ~/.profile
rm -rf ~/.dotfiles
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
2016-12-19 17:06:38 +01:00
## vim
# cleaning
rm -rf ~/.vim*
# installing
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
2016-12-19 17:06:38 +01:00
## .gitignore
# cleaning
rm -rf ~/.gitignore
# installing
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
2016-12-19 17:06:38 +01:00
## tmux
# cleaning
rm -rf ~/.tmux.conf
# installing
2013-08-19 11:42:09 +02:00
ln -sf ~/.dotfiles/tmux.conf ~/.tmux.conf
2016-06-16 17:26:43 +02:00
2016-12-19 17:06:38 +01:00
## fish
# cleaning
rm -rf ~/.config/fish ~/.local/share/fish ~/.config/omf ~/.local/share/omf
# installing omf
2016-12-20 10:56:59 +01:00
curl -L https://github.com/oh-my-fish/oh-my-fish/raw/master/bin/install > ~/install.omf
fish ~/install.omf --noninteractive
2016-12-19 17:26:38 +01:00
fish -c 'omf install bobthefish'
2016-12-20 10:56:59 +01:00
rm -rf ~/install.omf
2016-12-19 17:06:38 +01:00
# installing misc settings
2016-12-19 18:08:23 +01:00
mkdir -p ~/.config/fish/functions
echo 'function fish_greeting; end' > ~/.config/fish/functions/fish_greeting.fish
echo 'function fish_right_prompt; end' > ~/.config/fish/functions/fish_right_prompt.fish
2016-06-16 17:26:43 +02:00
touch ~/.fish.local
2016-12-19 17:38:45 +01:00
echo 'set -g theme_title_use_abbreviated_path no' > ~/.config/fish/config.fish
2016-12-19 17:26:38 +01:00
if [ `hostname` != 'tuonela' ]; then
2016-12-19 17:38:45 +01:00
echo 'set -g theme_display_user yes' >> ~/.config/fish/config.fish
2016-12-19 17:26:38 +01:00
fi
2016-06-16 17:26:43 +02:00
echo 'source ~/.fish.local' >> ~/.config/fish/config.fish