-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-pi.sh
executable file
·52 lines (40 loc) · 1.31 KB
/
install-pi.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
if ! command -v git >/dev/null 2>&1; then
echo "git is required. Please install it first."
exit 1;
fi
cd ~
if [ ! -d "dotfiles" ] ; then
git clone git://github.com/sfabrizio/dotfiles.git dotfiles
fi
bash -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
if ! [ -d ~/.nvm ]; then
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.4/install.sh | bash
fi
echo "Creating backup of your previus config files."
cp ~/.gitconfig ~/.gitconfig.bak > /dev/null
cp ~/.vimrc ~/.vimrc.bak > /dev/null
cp ~/.zshrc ~/.zshrc.bak > /dev/null
cp ~/.tmux.conf ~/.tmux.conf.bak > /dev/null
#creating folders
cd ~/
mkdir -p dotfiles
mkdir -p workspace
mkdir -p .tmux
mkdir -p .autoenv
mkdir -p .config/nvim
#creating symbolic links
ln -s env .env
echo "Coping new configuration files.."
echo "[include] path = ~/dotfiles/gitconfig" > ~/.gitconfig
echo "source ~/dotfiles/vimrc" > ~/.vimrc
echo "source ~/.vimrc" > ~/.config/nvim/init.vim
echo "source ~/dotfiles/zshrc" > ~/.zshrc
echo "source ~/dotfiles/tmux.conf" > ~/.tmux.conf
echo "source ~/dotfiles/tmux-powerlinerc" > ~/.tmux-powerlinerc
source ~/.zshrc
echo "cloning git repos..."
cd ~/workspace
if [ ! -d "ozono-zsh-theme" ] ; then
git clone https://github.com/sfabrizio/ozono-zsh-theme
fi
echo "Everything Done."